Skip to content

Fix image metadata for detached deployment checkouts - #7

Closed
boostvolt wants to merge 1 commit into
mainfrom
codex/fix-detached-metadata
Closed

boostvolt wants to merge 1 commit into
mainfrom
codex/fix-detached-metadata

Conversation

@boostvolt

Copy link
Copy Markdown
Member

Deployment checks out the validated commit by SHA, leaving a detached HEAD without a branch ref. docker/metadata-action with context: git then fails with Cannot infer ref from detached HEAD.

Use the default workflow context and derive the short image tag from the checked-out commit. Set the OCI revision label from the checkout action's commit output. This preserves the exact validated build commit even when the deployment workflow SHA differs.

Validated with actionlint and YAML checks. Executed the exact pinned metadata action locally with synthetic GitHub events and a local API stub: reproduced the original error and verified correct SHA/latest tags and revision labels for both workflow_run and workflow_dispatch.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@boostvolt boostvolt closed this Oct 3, 2026
@boostvolt
boostvolt deleted the codex/fix-detached-metadata branch October 3, 2026 13:29
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