-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (45 loc) · 1.32 KB
/
cron-generate.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Generate new lists
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v2
with:
ref: main
path: main
- name: Checkout lists branch
uses: actions/checkout@v2
with:
ref: lists
path: lists
- name: Generate lists
run: |
cd ${GITHUB_WORKSPACE}/main/
chmod +x ./generate-lists.sh
./generate-lists.sh
- name: Generate lists.json
run: |
cd ${GITHUB_WORKSPACE}/main/
chmod +x ./generate-json.sh
./generate-json.sh
- name: Generate README.md
run: |
cd ${GITHUB_WORKSPACE}/main/
chmod +x ./generate-readme.sh
./generate-readme.sh
- name: Push changes to GitHub
run: |
cd ${GITHUB_WORKSPACE}/lists/
rsync -vrth --delete --exclude ".git*" ${GITHUB_WORKSPACE}/main/output/ ${GITHUB_WORKSPACE}/lists/
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add -A
git commit -am "Generated by GitHub Actions (${GITHUB_SHA::7})"
git push -qf origin lists