forked from rakr/vim-one
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 898 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Automatic merge from upstream
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Sync upstream changes every day
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_REPO: ${{ github.repository }}
run: |
REMOTE_REPO="rakr/vim-one"
git config user.email "[email protected]"
git config user.name "GitHub Merge Action"
git checkout master
git remote set-url origin "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPO"
git remote add upstream "https://github.com/$REMOTE_REPO"
git fetch upstream
git merge upstream/master
git remote rm upstream
git push origin HEAD:master