Files
ai-passport/.github/workflows/sync-main.yml
T
Shinku dbcd3d1dd3 Merge remote-tracking branch 'upstream/main' into ci/split-checks
Revert the temporary fork pin in sync-main.yml back to the aormsby
Fork-Sync-With-Upstream-action now that aormsby/Fork-Sync-With-Upstream-action#85
(rev-list branch/dir ambiguity fix) is merged on aormsby main.

Also lands the CI-validation.md (+ zh_CN) doc updates onto the new
docs/development/ci/ path from the upstream docs reorganization.
2026-09-03 21:24:27 +08:00

40 lines
1.4 KiB
YAML

name: Upstream Sync
permissions:
contents: write
on:
schedule:
- cron: "0 0 * * *" # every day
workflow_dispatch:
jobs:
sync_latest_from_upstream:
name: Sync latest commits from upstream repo
runs-on: ubuntu-latest
if: ${{ github.event.repository.fork }}
steps:
# Step 1: run a standard checkout action
- name: Checkout target repo
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/Fork-Sync-With-Upstream-action@3863de47aaf0256b8dee9cded3dfed090b7270a2 # v3.4.3 + rev-list ambiguity fix (aormsby/Fork-Sync-With-Upstream-action#85)
with:
upstream_sync_repo: FoloToy/ai-passport
upstream_sync_branch: main
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set
- name: Sync check
if: failure()
run: |
echo "[Error] 由于上游仓库的 workflow 文件变更,GitHub 可能暂停本次自动更新。请手动 Sync Fork,详见 docs/development/CI-sync-main.md。"
echo "[Error] An upstream workflow change may have paused automatic synchronization. Sync the fork manually; see docs/development/CI-sync-main.md."
exit 1