mirror of
https://github.com/lobehub/lobehub
synced 2026-04-21 17:47:27 +00:00
ci: fix sync workflow by using PAT for checkout (#12338)
The GITHUB_TOKEN cannot push changes to .github/workflows/ files due to GitHub's security restrictions. The 'workflows' permission key added in the previous commit is not a valid workflow permission scope. Fix: Use secrets.GH_TOKEN (PAT with workflow scope) in the checkout step so that git push has the necessary credentials to push branches that contain workflow file changes (e.g. from merge conflicts). Also reverts the invalid 'workflows: write' permission.
This commit is contained in:
parent
03bda41c07
commit
927fe3fd22
1 changed files with 1 additions and 1 deletions
2
.github/workflows/sync-main-to-canary.yaml
vendored
2
.github/workflows/sync-main-to-canary.yaml
vendored
|
|
@ -8,7 +8,6 @@ on:
|
|||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
workflows: write
|
||||
|
||||
jobs:
|
||||
sync-branches:
|
||||
|
|
@ -18,6 +17,7 @@ jobs:
|
|||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue