File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Auto Sync with Upstream
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * *' # daily
6+ workflow_dispatch : # allow manual trigger
7+
8+ jobs :
9+ sync :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+ with :
14+ fetch-depth : 0
15+
16+ - name : Set up git user
17+ run : |
18+ git config --global user.name 'github-actions[bot]'
19+ git config --global user.email 'github-actions[bot]@users.noreply.github.com'
20+
21+ - name : Add upstream remote and fetch
22+ run : |
23+ git remote add upstream https://github.com/upstream_owner/upstream_repo.git
24+ git fetch upstream
25+
26+ - name : Merge upstream changes
27+ run : |
28+ git checkout master
29+ git merge upstream/master
30+
31+ - name : Push changes
32+ env :
33+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ run : |
35+ git push origin master
You can’t perform that action at this time.
0 commit comments