healthcheck #171
This file contains 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
# Healthcheck | |
# | |
# Run a healthcheck against the API on a daily schedule or on workflow dispatch. | |
# | |
# References: | |
# | |
# - https://docs.github.com/actions/learn-github-actions/contexts | |
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#schedule | |
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | |
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch | |
# - https://github.com/hmarr/debug-action | |
--- | |
name: healthcheck | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
workflow_dispatch: | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
healthcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- id: debug | |
name: Print environment variables and event payload | |
uses: hmarr/debug-action@v2.1.0 | |
- id: healthcheck | |
name: Run healthcheck | |
run: curl --fail ${{ secrets.URL }}/health |