Skip to content

fix: pass proper ref to metadata-action#298

Merged
volmedo merged 1 commit intomainfrom
vic/fix/version-metadata
Mar 13, 2026
Merged

fix: pass proper ref to metadata-action#298
volmedo merged 1 commit intomainfrom
vic/fix/version-metadata

Conversation

@volmedo
Copy link
Member

@volmedo volmedo commented Mar 13, 2026

When not using a custom value, docker/metadata-action takes the ref from github.ref. However, the value of that is refs/heads/main when the workflow is triggered by workflow_run. That cannot be parsed into a semver, and the result is no tags in metadata, which then makes the docker push fail.

The fix is to extract the value from what the Determine ref step determines (which is the one that Releaser inferred from version.json). A match regex is also provided so that both v1.2.3 (what we will get when workflow_run) and refs/tags/v1.2.3 (what we will get when pushing a tag) work.

@volmedo volmedo self-assigned this Mar 13, 2026
@volmedo volmedo requested a review from alanshaw as a code owner March 13, 2026 13:08
@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@volmedo volmedo merged commit 6660806 into main Mar 13, 2026
14 checks passed
@volmedo volmedo deleted the vic/fix/version-metadata branch March 13, 2026 14:32
volmedo added a commit that referenced this pull request Mar 13, 2026
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