Cogito Backend Status Check #7495
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: 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" |