Skip to content

Commit bc88e8b

Browse files
JackLau1222github-actions[bot]
authored andcommitted
workflows: trigger test workflow after auto-rebase
Add workflow_dispatch trigger to test.yml and a step in auto-rebase to call it via gh CLI after pushing the workflows branch. This ensures tests run after rebase since GITHUB_TOKEN pushes don't trigger workflows.
1 parent 5d93056 commit bc88e8b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/auto-rebase.yml

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

99
permissions:
1010
contents: write
11+
actions: write
1112

1213
jobs:
1314
rebase:
@@ -46,3 +47,9 @@ jobs:
4647
4748
- name: Push changes
4849
run: git push origin ${{ matrix.branch }} --force-with-lease
50+
51+
- name: Trigger test workflow
52+
if: matrix.branch == 'workflows'
53+
run: gh workflow run test.yml --ref ${{ matrix.branch }}
54+
env:
55+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: "Test"
22

3-
on:
3+
on:
44
push:
55
pull_request:
6+
workflow_dispatch:
67

78
permissions: read-all
89

0 commit comments

Comments
 (0)