healthcheck #4758
This file contains hidden or 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: | |
| push: | |
| schedule: | |
| - cron: "*/12 * * * *" | |
| jobs: | |
| healthcheck: | |
| name: Health Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: server-check | |
| run: wget https://student-database-cosa-jztd.onrender.com --tries=1 -T 70 # Check if the server is working and turn it on if not working. | |
| - name: Output error code | |
| id: error | |
| run: echo "error=$?" >> $GITHUB_OUTPUT | |
| - name: Error code check | |
| run: | | |
| if [[ ${{ steps.error.outputs.error}} == 0 ]]; then exit 0; else exit 1; fi |