Skip to content

Commit 8697516

Browse files
Update template_update.yml
1 parent 83361bc commit 8697516

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/template_update.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ on:
1111
description: 'Branch of the project repo to update'
1212
required: true
1313
type: string
14+
secrets:
15+
token:
16+
description: 'Token with workflow permissions (optional, falls back to GITHUB_TOKEN)'
17+
required: false
1418

1519
permissions:
1620
contents: write
1721
pull-requests: write
18-
workflows: write
1922

2023
jobs:
2124
check-update:
@@ -72,6 +75,7 @@ jobs:
7275
ref: ${{ inputs.repo_branch }}
7376
fetch-depth: 0
7477
submodules: false
78+
token: ${{ secrets.token || github.token }}
7579

7680
- name: Set up Python
7781
uses: actions/setup-python@v5
@@ -110,7 +114,7 @@ jobs:
110114
id: merge
111115
shell: bash
112116
env:
113-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
GITHUB_TOKEN: ${{ secrets.token || github.token }}
114118
run: |
115119
set -euo pipefail
116120
@@ -174,7 +178,7 @@ jobs:
174178
175179
- name: Create pull request
176180
env:
177-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181+
GITHUB_TOKEN: ${{ secrets.token || github.token }}
178182
run: |
179183
OLD_SHA="${{ needs.check-update.outputs.old_sha }}"
180184
NEW_SHA="${{ needs.check-update.outputs.new_sha }}"

0 commit comments

Comments
 (0)