Backend Cron #1046
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |