forked from chainapsis/keplr-chain-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (47 loc) · 1.35 KB
/
cron-job.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
53
name: Cron Job Validation
on:
schedule:
- cron: "0 * * * *"
jobs:
validation:
name: Suggest Chain Validation Check
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup nodejs
uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install --global yarn
- run: yarn install --frozen-lockfile
- name: Check chain updates
id: check-update
continue-on-error: true
run: |
yarn ts-node src/schedule.ts
env:
PRICE_URL: ${{ secrets.PRICE_URL }}
- name: Slack Alert Notification
uses: slackapi/[email protected]
if: ${{ steps.check-update.outputs.hasError }}
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"text": "Suggest Chain Alert",
"attachments": [
{
"color": "FB486C",
"fields": [
{
"title": "Error Message",
"short": false,
"value": "${{ steps.check-update.outputs.errorMessage }}"
}
]
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}