Skip to content

Commit 423ba41

Browse files
committed
chore: remove redundant GH_TOKEN where gh uses GITHUB_TOKEN natively
gh CLI auto-reads GITHUB_TOKEN in GitHub Actions. Only override with GH_TOKEN when we need a different token (the GitHub App token for label changes that must trigger downstream workflows).
1 parent 3d53901 commit 423ba41

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/ci-ready.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
- name: Find matching publish issue
2222
id: find-issue
2323
env:
24-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2524
REPO: ${{ github.event.client_payload.repo }}
2625
VERSION: ${{ github.event.client_payload.version }}
2726
run: |
@@ -85,6 +84,9 @@ jobs:
8584
- name: Add ci-ready label
8685
if: steps.find-issue.outputs.number
8786
env:
87+
# Override the default GITHUB_TOKEN with the app token so the
88+
# label event triggers publish.yml (GITHUB_TOKEN events are
89+
# suppressed by GitHub and would not start new workflow runs).
8890
GH_TOKEN: ${{ steps.token.outputs.token }}
8991
ISSUE_NUMBER: ${{ steps.find-issue.outputs.number }}
9092
SHA: ${{ github.event.client_payload.sha }}

.github/workflows/publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
&& contains(github.event.issue.labels.*.name, 'ci-pending')
2424
steps:
2525
- name: Comment on issue
26-
env:
27-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2826
run: |
2927
gh issue comment "${{ github.event.issue.number }}" \
3028
-R "$GITHUB_REPOSITORY" \

0 commit comments

Comments
 (0)