Skip to content

Commit 593a2e8

Browse files
authored
fix: Use PAT for rebase workflow to trigger subsequent checks (#1001)
When using github.token, force-pushes don't trigger other workflows like Jenkins Security Scan. Using a PAT (GH_TOKEN secret) fixes this. Falls back to github.token if secret is not configured. To complete this fix, a repository admin needs to: 1. Create a PAT with 'repo' and 'workflow' scopes 2. Add it as repository secret named GH_TOKEN
1 parent e94e170 commit 593a2e8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/rebase-open-prs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
steps:
1616
- uses: mPokornyETM/rebase-open-prs-action@v1
1717
env:
18-
GH_TOKEN: ${{ github.token }}
18+
# Use PAT to trigger subsequent workflows (security scan, etc.)
19+
# Falls back to github.token if GH_TOKEN secret is not set
20+
GH_TOKEN: ${{ secrets.GH_TOKEN || github.token }}
1921
with:
20-
github-token: ${{ github.token }}
22+
github-token: ${{ secrets.GH_TOKEN || github.token }}

0 commit comments

Comments
 (0)