Skip to content

Commit e3a319f

Browse files
committed
fix(ci): restore GH_TOKEN for gh CLI steps in generate-patches
gh CLI in GitHub Actions requires explicit GH_TOKEN — it does not automatically use GITHUB_TOKEN unlike local usage.
1 parent bcb9beb commit e3a319f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ jobs:
152152
fi
153153
- name: Check fork eval status
154154
if: steps.detect-fork.outputs.is_fork == 'true'
155+
env:
156+
GH_TOKEN: ${{ github.token }}
155157
run: |
156158
SHA="${{ github.event.pull_request.head.sha }}"
157159
STATUS=$(gh api "repos/${{ github.repository }}/commits/$SHA/statuses" \
@@ -390,6 +392,8 @@ jobs:
390392
391393
- name: Download previous release binaries (release/**)
392394
if: startsWith(github.ref, 'refs/heads/release/')
395+
env:
396+
GH_TOKEN: ${{ github.token }}
393397
run: |
394398
PREV_TAG=$(gh api "repos/${{ github.repository }}/releases?per_page=5" \
395399
--jq '[.[] | select(.prerelease == false and .draft == false)] | .[0].tag_name // empty')
@@ -447,6 +451,8 @@ jobs:
447451

448452
- name: File issue on failure
449453
if: failure()
454+
env:
455+
GH_TOKEN: ${{ github.token }}
450456
run: |
451457
TITLE="Delta patch generation failed"
452458
BODY="The \`generate-patches\` job failed on [\`${GITHUB_REF_NAME}\`](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}).

0 commit comments

Comments
 (0)