Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pguyot committed May 2, 2021
1 parent bdf3281 commit 282e753
Showing 1 changed file with 58 additions and 7 deletions.
65 changes: 58 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,58 @@
# arm-runner-action
GitHub action to run CI within a virtualized ARM environment, typically
raspbian.

Run tests natively and build images directly from GitHub Actions using a
chroot-based virtualized Raspberry Pi (raspios/raspbian) environment.

With this action, you can:
- run tests in an environment closer to a real embedded system, using qemu
userland linux emulation;
- build artifacts in such environment and upload them;
- prepare images that are ready to run on Raspberry-Pi and other arm embedded
devices.

## Usage

Minimal usage is as follows:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pguyot/arm-runner-action@v1
with:
commands: |
some commands
commands to run tests

Typical usage to upload an image as an artifact:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pguyot/arm-runner-action@v1
id: build_image
with:
commands: |
commands to build image
- name: Compress the release image
if: github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/')
run: |
mv ${{ steps.build_image.outputs.image }} my-release-image.img
xz -0 -T 0 -v my-release-image.img
- name: Upload release image
uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/releng' || startsWith(github.ref, 'refs/tags/')
with:
name: Release image
path: my-release-image.img.xz

### Commands

The repository is copied to the image before the commands script is executed
in the chroot environment. The commands script is copied to /tmp/ and is
deleted on cleanup.

### Inputs

Expand All @@ -28,7 +68,7 @@ The following values are allowed:
- `raspbian_lite:2020-02-13`
- `raspios_lite:2021-03-04` (default)

More images will be added, eventually.
More images will be added, eventually. Feel free to submit PRs.

#### `image_additional_mb`

Expand All @@ -42,13 +82,24 @@ Other values include `cortex-a8` which translates to arm7vl.

#### `copy_artifact_path`

Source path to copy outside the image. Relative to the working directory, within the
image. Globs are allowed. Default is not to copy.
Source path to copy outside the image. Relative to the working directory,
within the image. Globs are allowed. Default is not to copy.

#### `copy_artifact_dest`

Destination path to copy outside the image. Relative to the working directory
(outside the image). Default to `.`
(outside the image). Defaults to `.`

#### `repository_path`

Absolute path, inside the image, where the repository is copied. Defaults
to `/<repository_name>`. It is also the working directory where commands are
executed.

#### `use_systemd_nspawn`

Use `systemd-nspanw` instead of chroot to run commands. Default is to use
chroot.

### Outputs

Expand Down

0 comments on commit 282e753

Please sign in to comment.