ci: use OCI artifacts for PR image tests#91
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ad5d0606a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # Remove the Docker image artifact to free up storage space | ||
| - name: Remove Docker Image Artifact | ||
| uses: geekyeggo/delete-artifact@v4 |
There was a problem hiding this comment.
Avoid hard-failing artifact deletion on fork PRs
This new step can fail the whole pull_request workflow after tests pass when the run token is read-only (the default for many forked PR contexts), because geekyeggo/delete-artifact@v4 deletes via the Actions API and requires write access to Actions. Since failOnError defaults to true, a 403 here marks the check red for external contributors even though image tests succeeded; add explicit permissions: actions: write where allowed, or set failOnError: false/conditional execution for read-only contexts.
Useful? React with 👍 / 👎.
Summary
This PR updates
.github/workflows/pr-tests.ymlon thedevelop-v1+node24line to 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 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.