🐛 Bug: Fix the bug that may cause GitHub action to not run.
Browse files
.github/workflows/sync.yml
CHANGED
|
@@ -16,14 +16,18 @@ jobs:
|
|
| 16 |
uses: actions/checkout@v4.2.1
|
| 17 |
with:
|
| 18 |
fetch-depth: 0 # 获取所有历史记录,以确保正确同步
|
|
|
|
| 19 |
|
| 20 |
- name: Sync Fork
|
| 21 |
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
|
| 22 |
with:
|
| 23 |
-
target_repo_token: ${{ secrets.
|
| 24 |
upstream_sync_repo: yym68686/uni-api
|
| 25 |
upstream_sync_branch: main
|
| 26 |
target_sync_branch: main
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
- name: Check for new commits
|
| 29 |
if: steps.sync.outputs.has_new_commits == 'true'
|
|
|
|
| 16 |
uses: actions/checkout@v4.2.1
|
| 17 |
with:
|
| 18 |
fetch-depth: 0 # 获取所有历史记录,以确保正确同步
|
| 19 |
+
token: ${{ secrets.PAT }} # 使用PAT替代GITHUB_TOKEN
|
| 20 |
|
| 21 |
- name: Sync Fork
|
| 22 |
uses: aormsby/Fork-Sync-With-Upstream-action@v3.4.1
|
| 23 |
with:
|
| 24 |
+
target_repo_token: ${{ secrets.PAT }}
|
| 25 |
upstream_sync_repo: yym68686/uni-api
|
| 26 |
upstream_sync_branch: main
|
| 27 |
target_sync_branch: main
|
| 28 |
+
upstream_pull_args: --allow-unrelated-histories --no-edit --strategy-option theirs
|
| 29 |
+
force_push: true
|
| 30 |
+
test_mode: false
|
| 31 |
|
| 32 |
- name: Check for new commits
|
| 33 |
if: steps.sync.outputs.has_new_commits == 'true'
|