Skip to content

Commit 5d9a8d4

Browse files
committed
feat: update sync-upstream workflow comments and token
1 parent d64fb22 commit 5d9a8d4

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/sync-upstream.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2-
# Requires: Settings -> Actions -> General ->
3-
# "Allow GitHub Actions to create and approve pull requests".
2+
# Requires:
3+
# * Settings -> Actions -> General ->
4+
# "Allow GitHub Actions to create and approve pull requests".
5+
# * A repo secret SYNC_TOKEN holding a PAT with the `workflow` scope
46
name: Sync upstream release
57

68
on: # yamllint disable-line rule:truthy
@@ -25,6 +27,9 @@ jobs:
2527
with:
2628
ref: ${{ env.TARGET_BRANCH }}
2729
fetch-depth: 0
30+
# PAT with `workflow` scope so the push may include upstream
31+
# changes to .github/workflows/*. Persisted for the git push step.
32+
token: ${{ secrets.SYNC_TOKEN }}
2833

2934
- name: Configure git identity
3035
run: |
@@ -86,7 +91,9 @@ jobs:
8691
- name: Open or update pull request
8792
if: steps.merge.outputs.up_to_date == 'false'
8893
env:
89-
GH_TOKEN: ${{ github.token }}
94+
# PAT (not GITHUB_TOKEN) so the PR triggers build-image's
95+
# pull_request check to confirm the merged upstream still builds.
96+
GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
9097
UPSTREAM_TAG: ${{ steps.upstream.outputs.tag }}
9198
SYNC_BRANCH: ${{ steps.upstream.outputs.branch }}
9299
CONFLICTS: ${{ steps.merge.outputs.conflicts }}

0 commit comments

Comments
 (0)