-
Notifications
You must be signed in to change notification settings - Fork 167
36 lines (34 loc) · 1.08 KB
/
cron-metrics.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
name: Cron Metrics
on:
schedule:
- cron: '*/60 * * * *'
workflow_dispatch:
jobs:
update:
name: Calculate metrics
runs-on: ubuntu-latest
strategy:
matrix:
env: ['staging', 'production']
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout latest cron release tag
run: |
LATEST_TAG=$(git describe --tags --abbrev=0 --match='cron-*')
git checkout $LATEST_TAG
- uses: actions/setup-node@v2
with:
node-version: '18'
- uses: bahmutov/npm-install@v1
- name: Run job
env:
DEBUG: '*'
ENV: ${{ matrix.env }}
STAGING_DATABASE_CONNECTION: ${{ secrets.STAGING_DATABASE_CONNECTION }}
STAGING_RO_DATABASE_CONNECTION: ${{ secrets.STAGING_DATABASE_CONNECTION }} # no replica for staging
PROD_DATABASE_CONNECTION: ${{ secrets.PROD_DATABASE_CONNECTION }}
PROD_RO_DATABASE_CONNECTION: ${{ secrets.PROD_RO_DATABASE_CONNECTION }}
run: yarn --cwd packages/cron start:metrics