mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-20 10:36:37 +08:00
fix: add PAT token
This commit is contained in:
parent
5a0a075d0c
commit
6cfa4c59f6
6
.github/workflows/sync-upstream.yml
vendored
6
.github/workflows/sync-upstream.yml
vendored
@ -11,17 +11,19 @@ jobs:
|
||||
permissions: # 添加必要的权限
|
||||
pull-requests: write
|
||||
contents: write
|
||||
workflows: write # 添加 workflows 权限
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # 获取完整历史
|
||||
token: ${{ secrets.PAT_TOKEN }} # 使用PAT以便推送分支
|
||||
|
||||
- name: Sync upstream pull requests
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
# github-token: ${{ secrets.PAT_TOKEN }}
|
||||
script: |
|
||||
const upstream = 'songquanpeng/one-api';
|
||||
const [owner, repo] = upstream.split('/');
|
||||
|
Loading…
Reference in New Issue
Block a user