-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (49 loc) · 1.74 KB
/
re-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: re-generate
on:
schedule:
- cron: '0 */12 * * *'
push:
pull_request:
jobs:
re-generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
# FIXME: 最新にするとtools/update-shops-prismstone.tsのaxios.getで下記のようなエラーになるので16で止めている
# Error: write EPROTO C067081E767F0000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:922:
node-version: 16
cache: npm
cache-dependency-path: csv2rdf/package-lock.json
- working-directory: csv2rdf
name: update shops
run: |
npm ci
npx ts-node tools/update-shops-primagi.ts
npx ts-node tools/update-shops-prismstone.ts
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.GH_APPS_ID }}
private_key: ${{ secrets.GH_APPS_PRIVATE_KEY }}
if: github.event_name == 'schedule'
- uses: peter-evans/create-pull-request@v3
with:
token: ${{ steps.generate-token.outputs.token }}
committer: GitHub <[email protected]>
title: 'お店情報のアップデート'
body: |
お店情報の自動アップデートです! #274
labels: |
automerge
if: github.event_name == 'schedule'
- name: Slack Notification
uses: lazy-actions/slatify@master
if: "! success()" # cronで実行されるので失敗時のみ通知する
continue-on-error: true
with:
job_name: '*re-generate*'
type: ${{ job.status }}
url: ${{ secrets.SLACK_WEBHOOK }}
token: ${{ secrets.GITHUB_TOKEN }}