Skip to content

Commit a286e52

Browse files
authored
Merge pull request #6200 from IntersectMBO/jl/ghcr-latest-on-workflow
ci: allow ghcr to latest tag pre-release promotions via dispatch
2 parents f735c66 + 9b0bb17 commit a286e52

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/release-ghcr.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,15 @@ jobs:
9393
echo "Latest release tag is: $LATEST_TAG"
9494
9595
- name: Tagging intersectmbo container latest
96-
if: ${{ github.event.release.tag_name == steps.latest-tag.outputs.LATEST_TAG }}
96+
# Github releases are checked for latest tag in the first `or` operand of
97+
# the if statement. However, promoted pre-releases or changed full
98+
# releases do not count as a `published` event and so won't trigger
99+
# this workflow. For those use cases a manual workflow must be run
100+
# from the matching release tag which the second `or` operand checks
101+
# for.
102+
if: |
103+
(github.event_name == 'release' && github.event.release.tag_name == steps.latest-tag.outputs.LATEST_TAG) ||
104+
(github.event_name == 'workflow_dispatch' && github.ref == format('refs/tags/{0}', steps.latest-tag.outputs.LATEST_TAG))
97105
run: |
98106
echo "::group::Tagging latest for intersectmbo/cardano-node"
99107
skopeo copy docker-archive:./result-node docker://ghcr.io/intersectmbo/cardano-node:latest

0 commit comments

Comments
 (0)