Skip to content

ci: Use PR head SHA for Docker image tags#40

Merged
dmetz-figma merged 2 commits intomasterfrom
metz/fix-docker-sha-tag
Mar 9, 2026
Merged

ci: Use PR head SHA for Docker image tags#40
dmetz-figma merged 2 commits intomasterfrom
metz/fix-docker-sha-tag

Conversation

@dmetz-figma
Copy link
Collaborator

@dmetz-figma dmetz-figma commented Mar 9, 2026

On pull_request triggers, github.sha points to the ephemeral merge commit (refs/pull/N/merge), not the branch HEAD. This means type=sha,format=long tags the image with a SHA that doesn't correspond to any real commit in the repo.

Switch to type=raw using github.event.pull_request.head.sha so the tag matches the actual commit. Falls back to github.sha on push events (where it's already the real commit).

@dmetz-figma dmetz-figma marked this pull request as ready for review March 9, 2026 14:57
@dmetz-figma dmetz-figma merged commit face147 into master Mar 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants