From 96bffd8651eb759446f74a151f5e394abd138663 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 22:18:07 +0000 Subject: [PATCH] ci: stop upstream's Gitee mirror job from running in this fork Sync Repo force-pushes to OpenListTeam's Gitee mirror and has no secrets here, so it failed on every push to main. Guard it to OpenListTeam's repo, which keeps the file identical to upstream apart from one line. Also let the daily upstream sync keep translated READMEs deleted instead of opening a conflict issue whenever upstream edits them. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WHvprAc3MkwJLsuk533AsX --- .github/workflows/sync_repo.yml | 2 ++ .github/workflows/upstream-sync.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/sync_repo.yml b/.github/workflows/sync_repo.yml index 17585885..e40a2a1a 100644 --- a/.github/workflows/sync_repo.yml +++ b/.github/workflows/sync_repo.yml @@ -8,6 +8,8 @@ on: jobs: sync: + # Upstream's Gitee mirror job. Only runs in OpenListTeam's repo. + if: github.repository == 'OpenListTeam/OpenList-Worker' runs-on: ubuntu-latest name: Sync Repository steps: diff --git a/.github/workflows/upstream-sync.yml b/.github/workflows/upstream-sync.yml index 381c2423..fe67006e 100644 --- a/.github/workflows/upstream-sync.yml +++ b/.github/workflows/upstream-sync.yml @@ -45,6 +45,8 @@ jobs: for f in wrangler.jsonc README.md; do if git diff --name-only --diff-filter=U | grep -qx "$f"; then git checkout --ours -- "$f"; git add "$f"; fi done + # Translated READMEs are deleted here; keep them deleted when upstream edits them. + git diff --name-only --diff-filter=U | grep -E '^readmes/[^/]+\.md$' | xargs -r git rm -q -- left=$(git diff --name-only --diff-filter=U) if [ -n "$left" ]; then git merge --abort