Skip to content

Commit

Permalink
Fix test, add clarification for base_image used in conjunction with c…
Browse files Browse the repository at this point in the history
…aching
  • Loading branch information
uraimo committed Dec 23, 2022
1 parent c75a65e commit f0018f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/advanced-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
# In this workflow, the only none step using a base_image is Ubuntu,
# so update apt without checking the acutal base_image value.
install: |
case "${{ matrix.distro }}" in
ubuntu*|jessie|stretch|buster)
Expand All @@ -76,6 +78,9 @@ jobs:
archarm*)
pacman -Syyu --noconfirm
pacman -S git which --noconfirm
none)
apt-get update -q -y
apt-get install -q -y git
esac
# Produce a binary artifact and place it in the mounted volume
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The action also accepts some optional input parameters:
* `dockerRunArgs`: Additional arguments to pass to `docker run`, such as volume mappings. See [`docker run` documentation](https://docs.docker.com/engine/reference/commandline/run).
* `setup`: Shell commands to execute on the host before running the container, such as creating directories for volume mappings.
* `install`: Shell commands to execute in the container as part of `docker build`, such as installing dependencies. This speeds up subsequent builds if `githubToken` is also used, but note that the image layer will be publicly available in your projects GitHub Package Registry, so make sure the resulting image does not have any secrets cached in logs or state.
* `base_image`: Specify a custom base image, such as [busybox](https://hub.docker.com/_/busybox), `arch` and `distro` should be set to `none` in this case. This will allow you to chose direcly the image that will be used in the *FROM* clause of the internal docker container without needing to create a Dockerfile.arch.distro for a specific arch/distro pair. For more detials, see [PR #103](https://github.com/uraimo/run-on-arch-action/pull/103#issuecomment-1363810049).
* `base_image`: Specify a custom base image, such as [busybox](https://hub.docker.com/_/busybox), `arch` and `distro` should be set to `none` in this case. This will allow you to chose direcly the image that will be used in the *FROM* clause of the internal docker container without needing to create a Dockerfile.arch.distro for a specific arch/distro pair. For more detials, see [PR #103](https://github.com/uraimo/run-on-arch-action/pull/103#issuecomment-1363810049). Known limitation: Only one base_image configuration for each workflow if you use GitHub images caching.

### Basic example

Expand Down

0 comments on commit f0018f7

Please sign in to comment.