File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Merge upstream branches every Thursday 00:00
2+ on :
3+ schedule :
4+ - cron : ' 0 */12 * * *'
5+ jobs :
6+ merge :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v2
10+ with :
11+ persist-credentials : false
12+ token : ${{secrets.GHPAGE_SECRET}}
13+ - name : Merge upstream
14+ run : |
15+ git config --global user.name 'GitHub Action by Anthony'
16+ git config --global user.email '[email protected] ' 17+
18+ # "git checkout master" is unnecessary, already here by default
19+ git pull --unshallow # this option is very important, you would get
20+ # complains about unrelated histories without it.
21+ # (but actions/checkout@v2 can also be instructed
22+ # to fetch all git depth right from the start)
23+
24+ git remote set-url origin https://${{secrets.GHPAGE_SECRET}}@github.com/anthonychwong/gbgwcalculator
25+
26+ git remote add upstream https://github.com/rmkane/gbgwcalculator.github.io.git
27+ git fetch upstream
28+
29+ git checkout master
30+ git merge --no-edit upstream/master
31+ git push origin master
You can’t perform that action at this time.
0 commit comments