-
Notifications
You must be signed in to change notification settings - Fork 34
43 lines (34 loc) · 929 Bytes
/
update.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
name: update
on:
push:
schedule:
# Run at 11:30 JST
- cron: '30 2 * * *'
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Restore cache of data
uses: actions/cache@v4
with:
path: cache
key: cache-${{ runner.os }}-${{ hashFiles('data/md5') }}
- name: Download or Restore archive
run: |
if [ -f cache/src.zip ]; then mv cache/src.zip data/src.zip; fi
./bin/zengin download || true
mkdir -p cache
cp data/src.zip cache/src.zip
- name: Update archive
run: ./bin/zengin update
- name: Commit
run: ./bin/zengin commit
# run on master branch only
if: github.ref == 'refs/heads/master'