forked from OffchainLabs/arbitrum-token-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (45 loc) · 1.91 KB
/
orbit-batch-poster-monitor.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
54
55
56
57
58
59
name: Monitor Orbit Batch Posting
on:
workflow_dispatch:
schedule:
# Run every 6 hours
- cron: "0 */6 * * *"
env:
NEXT_PUBLIC_INFURA_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
BATCH_POSTER_MONITORING_SLACK_TOKEN: ${{ secrets.ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN }}
BATCH_POSTER_MONITORING_SLACK_CHANNEL: ${{ secrets.ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL }}
jobs:
run-alerting:
runs-on: ubuntu-latest
steps:
- name: Checkout Bridge
uses: actions/checkout@v4
with:
repository: OffchainLabs/arbitrum-token-bridge
- name: Restore node_modules
uses: OffchainLabs/actions/node-modules/restore@main
- name: Install dependencies
run: yarn install
- name: Generate chains JSON
run: yarn workspace arb-token-bridge-ui generateOrbitChainsToMonitor
- name: Checkout Arbitrum Monitoring repository
uses: actions/checkout@v4
with:
repository: OffchainLabs/arbitrum-monitoring
path: arbitrum-monitoring
- name: Copy chains JSON to Arbitrum Monitoring
run: cp ./packages/arb-token-bridge-ui/public/__auto-generated-orbit-chains.json ./arbitrum-monitoring/packages/batch-poster-monitor/config.json
- name: Setup Node for Arbitrum Monitoring
uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies for Arbitrum Monitoring
run: cd ./arbitrum-monitoring && yarn install
- name: Run alerting command
run: cd ./arbitrum-monitoring && yarn batch-poster-monitor --enableAlerting
env:
NODE_ENV: "CI"
BATCH_POSTER_MONITORING_SLACK_TOKEN: ${{ secrets.ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_TOKEN }}
BATCH_POSTER_MONITORING_SLACK_CHANNEL: ${{ secrets.ORBIT_CHAIN_BATCH_POSTER_MONITORING_SLACK_CHANNEL }}
- name: Clean up
run: rm ./packages/arb-token-bridge-ui/public/__auto-generated-orbit-chains.json