Skip to content

Hourly Sync

Hourly Sync #1155

Workflow file for this run

name: Hourly Sync
on:
schedule:
- cron: "0 0/4 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Ping Cron Endpoint
env:
# APP_URL is a non-sensitive deployment URL stored as a repository
# variable (vars), not a secret, so it is safe to log and inject here.
APP_URL: ${{ vars.APP_URL }}
CRON_SECRET: ${{ secrets.CRON_SECRET }}
run: |
if [ -z "$APP_URL" ] || [ -z "$CRON_SECRET" ]; then
echo "APP_URL or CRON_SECRET not set. Skipping."
exit 0
fi
curl -f -X POST "$APP_URL/api/cron" \
-H "Authorization: Bearer $CRON_SECRET" \
-H "Content-Type: application/json" \
-d "{}"