File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Sync Upstream (PR-based, fork-safe)
22
33on :
44 schedule :
5- - cron : " */5 * * * *" # every 5 minutes
5+ - cron : " */5 * * * *"
66 workflow_dispatch :
77
88permissions :
@@ -33,17 +33,15 @@ jobs:
3333 run : |
3434 git checkout -B upstream-sync upstream/main
3535
36- # 🚫 HARD BLOCK: never allow workflow files from upstream
37- - name : Remove upstream workflows ( fork-safe)
36+ # 🚫 CRITICAL FIX: remove workflows from the index ONLY
37+ - name : Exclude upstream workflows from fork
3838 run : |
39- rm -rf .github/workflows
40- mkdir -p .github/workflows
41- echo "# Fork-safe workflows only" > .github/workflows/.keep
39+ git rm -r --cached .github/workflows || true
4240
4341 - name : Commit sanitized upstream changes
4442 run : |
4543 git add .
46- git commit -m "Sync upstream (workflows stripped )" || echo "No changes"
44+ git commit -m "Sync upstream (exclude workflows )" || echo "No changes"
4745
4846 - name : Push sync branch
4947 run : |
5856 body : |
5957 Automated upstream sync PR.
6058
61- ✅ Fork-safe
62- 🚫 Upstream workflows stripped
63- 🔁 Runs every 5 minutes
59+ - Fork-safe
60+ - Upstream workflows excluded
61+ - Runs every 5 minutes
6462 labels : |
6563 upstream-sync
6664 automated
You can’t perform that action at this time.
0 commit comments