Skip to content

Commit 3474fc5

Browse files
authored
Update health check URL in workflow
1 parent 1f3cbaf commit 3474fc5

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/healthcheck.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: healthcheck
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: "*/12 * * * *"
7+
jobs:
8+
healthcheck:
9+
name: Health Check
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: server-check
13+
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.
14+
- name: Output error code
15+
id: error
16+
run: echo "error=$?" >> $GITHUB_OUTPUT
17+
- name: Error code check
18+
run: |
19+
if [[ ${{ steps.error.outputs.error}} == 0 ]]; then exit 0; else exit 1; fi

0 commit comments

Comments
 (0)