-
Notifications
You must be signed in to change notification settings - Fork 119
51 lines (46 loc) · 1.53 KB
/
cron-pins.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
name: Cron Pins
on:
schedule:
- cron: '*/60 * * * *'
workflow_dispatch:
jobs:
update:
name: Update pin statuses and size
runs-on: ubuntu-latest
strategy:
matrix:
env: ['staging', 'production']
include:
- env: production
pickup_url: https://pickup.dag.haus
- env: staging
pickup_url: https://staging.pickup.dag.haus
timeout-minutes: 60
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
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Run job
env:
DEBUG: '*'
ENV: ${{ matrix.env }}
PROD_PG_REST_JWT: ${{ secrets.PROD_PG_REST_JWT }}
STAGING_PG_REST_JWT: ${{ secrets.STAGING_PG_REST_JWT }}
PROD_PG_REST_URL: ${{ secrets.PROD_PG_REST_URL }}
STAGING_PG_REST_URL: ${{ secrets.STAGING_PG_REST_URL }}
CLUSTER_API_URL: ${{ matrix.pickup_url }}
CLUSTER_BASIC_AUTH_TOKEN: ${{ secrets.CLUSTER_BASIC_AUTH_TOKEN }}
run: npm run start:pins -w packages/cron
- name: Heartbeat
if: ${{ success() }}
run: ./packages/tools/scripts/cli.js heartbeat --token ${{ secrets.OPSGENIE_KEY }} --name cron-web3storage-pins-${{matrix.env}}