File tree Expand file tree Collapse file tree 2 files changed +51
-103
lines changed
Expand file tree Collapse file tree 2 files changed +51
-103
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Sync Upstream (PR-based)
2+
3+ on :
4+ schedule :
5+ - cron : " */5 * * * *" # every 5 minutes
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ sync :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout fork
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+
22+ - name : Configure git
23+ run : |
24+ git config user.name "github-actions[bot]"
25+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
26+
27+ - name : Add upstream
28+ run : |
29+ git remote add upstream https://github.com/github/docs.git || true
30+ git fetch upstream
31+
32+ - name : Create sync branch
33+ run : |
34+ git checkout -B upstream-sync upstream/main
35+
36+ - name : Push sync branch
37+ run : |
38+ git push origin upstream-sync --force
39+
40+ - name : Create or update PR
41+ uses : peter-evans/create-pull-request@v6
42+ with :
43+ branch : upstream-sync
44+ title : " ⬆️ Sync with upstream (github/docs)"
45+ body : |
46+ Automated PR to sync this fork with the latest upstream changes.
47+ - Runs every 5 minutes
48+ - Fork-safe
49+ - No auto-merge
50+ base : main
51+ delete-branch : false
You can’t perform that action at this time.
0 commit comments