-
Notifications
You must be signed in to change notification settings - Fork 8
35 lines (33 loc) · 1.07 KB
/
safulo-hyperlinks.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
name: Safulo dictionary hyperlinks
on:
schedule:
- cron: '0 0 * * *'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1000
- name: list modified files
id: listfiles
working-directory: ./safulo-daily
run: |
git diff --name-only $(<last)..HEAD | tee filelist
test -s filelist && echo "::set-output name=has_newfiles::true"
- name: generate stem-words.json
if: steps.listfiles.outputs.has_newfiles == 'true'
working-directory: ./safulo-daily
run: |
python reprocess-moedict-safulo.py last
- name: commit generated files
if: steps.listfiles.outputs.has_newfiles == 'true'
run: |
git config user.email miaoski@gmail.com
git config user.name miaoski-bot
git commit -m 'bot generated hyperlinks' ./docs/s/
git rev-parse HEAD > safulo-daily/last
git commit -m 'bot generated hyperlinks' ./safulo-daily/last
git push