Skip to content

Commit 1008887

Browse files
authored
Merge pull request #94 from TencentCloud/hotfix/auto-tag-trigger-downstream
fix(ci): dispatch Release/Docker after auto-tag
2 parents fdbda8d + 4ed775a commit 1008887

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/auto-tag-on-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
actions: write
1011

1112
jobs:
1213
tag:
@@ -61,3 +62,14 @@ jobs:
6162
tag="${{ steps.version.outputs.tag }}"
6263
git tag "$tag"
6364
git push origin "$tag"
65+
66+
# GITHUB_TOKEN tag pushes do not cascade to other workflows. Explicitly
67+
# dispatch Release / Docker Publish (workflow_dispatch is exempt).
68+
- name: Trigger Release and Docker Publish
69+
if: steps.check_tag.outputs.should_publish == 'true'
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
run: |
73+
tag="${{ steps.version.outputs.tag }}"
74+
gh workflow run release.yml --ref "$tag"
75+
gh workflow run docker-publish.yml --ref "$tag"

.github/workflows/docker-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
push:
88
tags:
99
- "v*"
10+
# Allow Auto Tag On Release Merge to cascade after a GITHUB_TOKEN tag push
11+
# (token-authored pushes do not retrigger push workflows).
12+
workflow_dispatch:
1013

1114
jobs:
1215
docker:

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags:
66
- "v*"
7+
# Allow Auto Tag On Release Merge to cascade after a GITHUB_TOKEN tag push
8+
# (token-authored pushes do not retrigger push workflows).
9+
workflow_dispatch:
710

811
permissions:
912
contents: write

0 commit comments

Comments
 (0)