Skip to content

Commit 5843dd8

Browse files
committed
fix(ci): document permissions, fix template injection in weekly-update
1 parent d7fa64a commit 5843dd8

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/provenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
timeout-minutes: 45
135135
permissions:
136136
contents: read
137-
id-token: write
137+
id-token: write # NPM trusted publishing via OIDC
138138

139139
steps:
140140
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/weekly-update.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
if: needs.check-updates.outputs.has-updates == 'true' && inputs.dry-run != true
5353
runs-on: ubuntu-latest
5454
permissions:
55-
contents: write
56-
pull-requests: write
55+
contents: write # Push update branch
56+
pull-requests: write # Create PR
5757
steps:
5858
- name: Checkout repository
5959
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -69,9 +69,10 @@ jobs:
6969
id: branch
7070
env:
7171
GH_TOKEN: ${{ github.token }}
72+
GITHUB_REPO: ${{ github.repository }}
7273
run: |
7374
BRANCH_NAME="weekly-update-$(date +%Y%m%d)"
74-
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
75+
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPO}.git"
7576
git checkout -b "$BRANCH_NAME"
7677
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
7778

0 commit comments

Comments
 (0)