-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (37 loc) · 1.2 KB
/
leaderboard_pipeline.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
31
32
33
34
35
36
37
name: Update our AoC leaderboard in a markdown table
on:
push:
branches:
- 'master'
jobs:
update_readme:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
with:
ref: 'master'
- name: Merge master on leaderboard
run: |-
git config --global user.email "[email protected]"
git config --global user.name "README-bot"
git fetch origin leaderboard:leaderboard
git merge --allow-unrelated-histories -s ours leaderboard
git switch leaderboard
git merge --no-ff --no-commit master
git commit -m "Merge branch 'leaderboard'"
- name: Update leaderboard
run: ./update_leaderboard.sh
env:
COOKIE: ${{ secrets.COOKIE }}
- name: Commit, push and merge if changed
run: |-
git diff
git config --global user.email "[email protected]"
git config --global user.name "README-bot"
git add -A
git commit -m "Update leaderboard" || exit 0
git push origin leaderboard
git switch master
git merge leaderboard
git push