-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1.02 KB
/
Copy pathbackend-cron.yml
File metadata and controls
35 lines (31 loc) · 1.02 KB
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
name: Backend Cron
on:
schedule:
- cron: "*/5 * * * *"
workflow_dispatch:
jobs:
run-cron-jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
BACKEND_BASE_URL: https://api.usecoal.xyz
CRON_SECRET: ${{ secrets.COAL_CRON_SECRET }}
steps:
- name: Verify payments
run: |
curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${CRON_SECRET}" \
"${BACKEND_BASE_URL}/api/cron/verify-payments"
- name: Retry webhooks
run: |
curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${CRON_SECRET}" \
"${BACKEND_BASE_URL}/api/cron/retry-webhooks"
- name: Process subscriptions
run: |
curl --fail-with-body --silent --show-error \
--request POST \
--header "Authorization: Bearer ${CRON_SECRET}" \
"${BACKEND_BASE_URL}/api/cron/process-subscriptions"