Skip to content

Cogito Backend Status Check #4394

Cogito Backend Status Check

Cogito Backend Status Check #4394

Workflow file for this run

name: Cogito Backend Status Check
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '0 * * * *'
workflow_dispatch:
jobs:
health_status_check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Ping API endpoint
run: |
response=$(curl -o /dev/null -s -w "%{http_code}\n" http://www.cogito-backend.net/api/health-check/)
if [ "$response" -ne 200 ]; then
echo "API response is not 200, actual response: $response"
exit 1
fi
echo "API response is 200, actual response: $response"