Skip to content

Commit 531d55c

Browse files
committed
Add github actions
1 parent 35447d8 commit 531d55c

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/main.yml

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

0 commit comments

Comments
 (0)