feat: manual on-demand Docker image build workflow for PRs#448
Merged
Conversation
Agent-Logs-Url: https://github.com/mandarons/icloud-docker/sessions/fbcfae37-db44-44be-a75e-da232c21ec9b Co-authored-by: mandarons <50469173+mandarons@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create manual docker image build workflow for PRs
feat: manual on-demand Docker image build workflow for PRs
May 20, 2026
mandarons
approved these changes
May 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a maintainer-invoked GitHub Actions workflow to build and publish a Docker image for a specified PR, enabling pre-merge testing by pulling a PR-scoped image from GHCR.
Changes:
- Introduces a
workflow_dispatch-only workflow that checks outrefs/pull/{N}/headfor a provided PR number. - Builds and pushes a multi-arch (
linux/amd64,linux/arm64) image taggedghcr.io/<owner>/<repo>:pr-{N}. - Posts a PR comment with pull/run instructions, image digest, and the exact PR HEAD SHA that was built.
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.
Maintainers had no way to build and share a Docker image from a contributor PR without merging to main first, blocking real-user pre-merge testing.
New workflow:
ci-pr-build-docker.ymlAdds a
workflow_dispatch-only workflow (no automatic triggers) that a maintainer can invoke from the Actions tab with a PR number as input.Steps:
refs/pull/{pr_number}/head— works for fork PRs whereGITHUB_TOKENpermissions would otherwise block automatic buildsgit rev-parse HEAD(avoidsgithub.shawhich resolves to the default branch inworkflow_dispatchcontext)linux/amd64,linux/arm64) and pushes to GHCR taggedghcr.io/mandarons/icloud-docker:pr-{N}Permissions scoped to job:
The run command in the comment includes the
/home/abc/.localvolume mount for keyring/session persistence, matching documented container usage.