You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add an image tarball output that later jobs can load and test #351
I use bake.yml to build 36 images in https://github.com/home-operations/containers. On each pull request, I want to run integration tests against the built image. The tests start the image as a container on an amd64 runner and on an arm64 runner.
bake.yml and build.yml accept only image or local for output. The build runs in jobs inside the reusable workflow. The image is not in the Docker image store of any caller job, so a test job can only pull it from a registry.
To test a pull request today, I must push the image to a scratch repository and test it by digest. A scratch repository is a registry repository that only holds test images. This has three costs:
Pull request runs need packages: write and registry credentials.
The scratch repository grows, and I must delete old versions myself.
Pull requests from forks cannot push, so they cannot run the tests.
I want an output that exports the image with the docker exporter and uploads the tarball as a GitHub artifact. When distribute is true, each runner builds one platform, so each runner can upload one tarball. output: local with artifact-upload already does this for a filesystem export.
A test job on the matching runner can then download the artifact, run docker load, and test the image. The test job does not need a registry or push credentials.
The example below shows the idea. output: docker and the artifact name are not real values.
Activity