ci: use OCI artifacts for PR image tests#85
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates
.github/workflows/pr-tests.ymlto stop pushing PR test images to Docker Hub and instead pass the built image between jobs as an OCI artifact. The test workflow now uploads the multi-arch build output frombuild-image, downloads it intest-image, extracts a per-architecture image into the local Docker daemon withskopeo, and removes the artifact after testing. The artifact name now includes the pull request number so concurrent PR runs do not share the same artifact identifier.Files Changed
Added:
Modified:
.github/workflows/pr-tests.ymlDeleted:
Key Changes
Login to Docker Hubstep frombuild-imageand changed theBuild Imagestep in.github/workflows/pr-tests.ymlfrompush: truetopush: falsewithoutputs: type=oci,dest=image.tar, so the workflow produces a local OCI archive instead of publishing a PR image to Docker Hub.Upload Docker Image Artifactinbuild-imageusingactions/upload-artifact@v4to persistimage.tarasdocker-image-pr-${{ github.event.pull_request.number }}for the downstream test job.docker pullflow fromtest-image, changedTEST_IMAGEfromruntimenode/test:pr-${{ github.event.pull_request.number }}totest:pr-${{ github.event.pull_request.number }}, and addedDownload Docker Image ArtifactplusExtract single-arch image with Skopeoso each matrix entry loads its ownlinux/amd64orlinux/arm64image astest:pr-<number>-<arch>.docker runassertion intest-imageto resolve${{ matrix.platform }}intoARCHand run against${{ env.TEST_IMAGE }}-$ARCH, keeping the existing smoke and integrity checks while testing the locally extracted per-architecture image.artifact-clean-upjob withgeekyeggo/delete-artifact@v4to removedocker-image-pr-${{ github.event.pull_request.number }}aftertest-imagecompletes.