Skip to content

Commit 18a842e

Browse files
committed
ci: Use a PAT with tag-new in order to trigger the release workflow.
1 parent 9b73988 commit 18a842e

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ on:
55
pull_request:
66
merge_group:
77
push: # testing, unless there's a tag (steps.0.if below)
8-
workflow_run:
9-
workflows: ["tag new release"]
10-
types:
11-
- completed
12-
138

149
env:
1510
REGISTRY: ghcr.io
@@ -27,14 +22,12 @@ jobs:
2722
outputs:
2823
binary_hashes: ${{ steps.binary.outputs.hashes }}
2924
image_subjects: ${{ steps.image.outputs.subjects }}
30-
# https://github.com/orgs/community/discussions/26238
31-
if: ${{ !github.event.workflow_run || github.event.workflow_run.conclusion == 'success' }}
3225
steps:
3326
- name: print github context
3427
env:
3528
GITHUB_CONTEXT: ${{ toJSON(github) }}
3629
run: echo $GITHUB_CONTEXT
37-
- if: ${{ !startsWith(github.ref, 'refs/tags/') && !github.event.workflow_run }}
30+
- if: ${{ !startsWith(github.ref, 'refs/tags/') }}
3831
run: echo "flags=--snapshot" >> $GITHUB_ENV
3932
- uses: actions/checkout@v4
4033
with:

.github/workflows/tag-new-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
- uses: mathieudutour/[email protected]
1616
continue-on-error: true # ok to not make a new tag
1717
with:
18-
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
# Special PAT so that we trigger new workflows
19+
github_token: ${{ secrets.TAG_TOKEN }}
1920
create_annotated_tag: true
2021
custom_release_rules: ci:none,chore:none,style:none
2122
dry_run: ${{ github.event_name != 'workflow_dispatch' && github.event_name != 'schedule' }}

0 commit comments

Comments
 (0)