-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.2 KB
/
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
44
45
46
47
48
name: update
on:
schedule:
# 15:00 in UTC is 24:00 in JST
- cron: '0 15 * * *'
push:
branches: main
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Use the latest npm
run: npm i -g npm
- name: Run npm install
run: npm ci
- name: Fetch contributors
run: npm run fetch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Diff
id: diff
run: |
git add -N .
git diff --name-only --exit-code
continue-on-error: true
- name: Commit & Push
run: |
set -x
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m 'generated'
git push
if: steps.diff.outcome == 'failure'
- name: Dispatch Deploy
run: npm run dispatch:deploy
env:
GITHUB_TOKEN: ${{ secrets.AMPLIFY_JUG_WEBSITE_TOKEN }}
if: steps.diff.outcome == 'failure'