healthcheck #164
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
name: healthcheck | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "21 1 * * *" | |
jobs: | |
curl: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Next.js is returning 20x status code | |
id: check-next | |
continue-on-error: true | |
run: | | |
curl --silent --show-error --fail https://open-data-monitor.splitgraph.io | |
- name: Notify Mattermost if failed | |
if: ${{ steps.check-next.outcome == 'failure' }} | |
run: | | |
curl -i -X POST --data-urlencode \ | |
"payload={\"text\": \"curl thinks https://open-data-monitor.splitgraph.io/ is down :warning:\nhttps://github.com/splitgraph/open-data-monitor/actions/runs/$GITHUB_RUN_ID\"}" \ | |
$MM_OPENDATAMONITOR_ALERT_URL | |
env: | |
MM_OPENDATAMONITOR_ALERT_URL: ${{ secrets.MM_OPENDATAMONITOR_ALERT_URL }} |