Skip to content

Commit

Permalink
Merge pull request #17 from zntb/dev
Browse files Browse the repository at this point in the history
Add finished exercise 11.20
  • Loading branch information
zntb authored Oct 7, 2024
2 parents 6e49c37 + f6a744d commit 5c14078
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/health-check-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Scheduled Health Check

on:
schedule:
- cron: '0 9 * * 1'

jobs:
health_check:
runs-on: ubuntu-latest

steps:
- name: Run actions/checkout@v4
uses: actions/checkout@v4

- name: Check the deployed service URL
uses: jtalk/url-health-check-action@v4
with:
url: https://fullstack-open-part3-ozn9.onrender.com/healthz
follow-redirect: false
max-attempts: 3
retry-delay: 5s
retry-all: false

- name: Notify success
uses: stegzilla/discord-notify@v4
if: success()
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: Health check passed!
message: 'The health check for the https://fullstack-open-part3-ozn9.onrender.com/ succeeded.'

- name: Notify failure
uses: stegzilla/discord-notify@v4
if: failure()
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: Health check failed!
message: 'The health check for https://fullstack-open-part3-ozn9.onrender.com/ failed.'

0 comments on commit 5c14078

Please sign in to comment.