Commit 6660806
authored
fix: pass proper ref to metadata-action (#298)
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.1 parent f52a984 commit 6660806
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
0 commit comments