-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: Resolve Docker image tag mismatch in multi-variant build workflow #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Gordon Beeming <[email protected]> Co-authored-by: GordonBeeming <[email protected]>
Co-authored-by: Gordon Beeming <[email protected]> Co-authored-by: GordonBeeming <[email protected]>
|
@copilot I'd like to force using the sha if possible in case multiple runs go at the same time... please update it |
- Add full SHA tag to base image push step - Reference SHA-based tags in Playwright and .NET builds - Ensures unique tags when multiple workflow runs execute simultaneously Co-authored-by: Gordon Beeming <[email protected]> Co-authored-by: GordonBeeming <[email protected]>
Updated in commit 8ba8a68. The base image now creates a full SHA tag ( |
Co-authored-by: Gordon Beeming <[email protected]> Co-authored-by: GordonBeeming <[email protected]>
|
@copilot the playwright image should use the base sha, dotnet should use the playwright-sha ... is that the case currently? they stack on each other |
Yes, that's correct. The images stack properly:
Each image builds on top of the previous one with SHA-specific tags to ensure proper isolation during concurrent runs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a Docker image tag mismatch issue in the GitHub Actions workflow that was causing Playwright variant image builds to fail. The workflow was attempting to reference a base image with a full SHA tag that didn't exist, since the metadata action only creates short SHA tags.
Key changes:
- Added explicit full SHA tagging to the base image push step
- Updated variant builds to use consistent SHA-based references for concurrent-run safety
- Enhanced workflow documentation with detailed troubleshooting information
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/publish.yml |
Added full SHA tagging after base image push to support variant image builds |
docs/tasks/20251009-01-fix-workflow-image-tag-mismatch.md |
Added comprehensive task documentation explaining the problem, solution, and implementation details |
| @@ -0,0 +1,98 @@ | |||
| # Fix Workflow Image Tag Mismatch | |||
|
|
|||
| **Date:** 2025-10-09 | |||
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The date appears to be in the future. Based on the current date being October 2025, this should likely be 2025-01-09 to match the filename format.
| **Date:** 2025-10-09 | |
| **Date:** 2025-01-09 |
| # Step 9: Push the image to registry only if needed | ||
| - name: Push image to registry |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Minor grammatical improvement: 'to registry' should be 'to the registry' for consistency with the step name.
| # Step 9: Push the image to registry only if needed | |
| - name: Push image to registry | |
| # Step 9: Push the image to the registry only if needed | |
| - name: Push image to the registry |
Problem
The GitHub Actions workflow was failing when building the Playwright variant image with the following error:
Failed workflow run: https://github.com/GordonBeeming/copilot_here/actions/runs/18372997964/job/52340446791
Root Cause
There was a mismatch between Docker image tag formats used by different parts of the workflow:
The
docker/metadata-action@v5withtype=shacreates tags using the short SHA format:mainlatestsha-e4cc1c4← 7-character short SHAThe Playwright and .NET build steps attempted to reference base images using the full SHA format:
BASE_IMAGE_TAG=sha-${{ github.sha }}→sha-e4cc1c4dd89220fe053bcfe51911f93319c044f8← 40-character full SHASince the full SHA tag was never created, the variant image builds failed with "not found" errors.
Solution
Added explicit full SHA tagging to the base image push step, then updated variant builds to use SHA-based references for concurrent-run safety:
Base image push step:
Playwright image:
dotnet image:
Benefits
How It Works
The workflow builds and pushes images sequentially:
latest,main, andsha-e4cc1c4tags, then explicitly tagged and pushed with fullsha-<commit-sha>tagsha-<commit-sha>base image, then pushed withplaywrightandplaywright-sha-<commit-sha>tagsplaywright-sha-<commit-sha>image, then pushed withdotnetanddotnet-sha-<commit-sha>tagsEach workflow run uses unique, commit-specific SHA tags, ensuring no conflicts during concurrent executions while maintaining full traceability.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.