mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 09:41:26 -08:00
Refactor ping test
This commit is contained in:
parent
048fec4886
commit
5b4b777e10
1 changed files with 15 additions and 12 deletions
|
@ -1,5 +1,4 @@
|
||||||
# .github/workflows/ping-test.yml
|
name: Ping Check
|
||||||
name: Site ping test
|
|
||||||
on:
|
on:
|
||||||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||||
schedule:
|
schedule:
|
||||||
|
@ -13,21 +12,25 @@ on:
|
||||||
required: true
|
required: true
|
||||||
default: 'warning'
|
default: 'warning'
|
||||||
tags:
|
tags:
|
||||||
description: 'Ping test'
|
description: 'Ping Check'
|
||||||
jobs:
|
jobs:
|
||||||
sitePingCheck:
|
check_site_uptime:
|
||||||
name: Slack Notification
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment: Staging
|
||||||
|
name: Ping the site
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Check the site
|
||||||
# https://github.com/marketplace/actions/ping-my-site
|
id: ping
|
||||||
- uses: Leocardoso94/is-my-site-up@v1.2
|
uses: Jtalk/url-health-check-action@v4
|
||||||
with:
|
with:
|
||||||
site: "https://d2zjid6n5ja2pt.cloudfront.net/justice40-tool/main/en/"
|
url: ${{ secrets.SITE_URL }}
|
||||||
# https://www.ravsam.in/blog/send-slack-notification-when-github-actions-fails/
|
basic-auth: '${{ secrets.STG_USER }}:${{ secrets.STG_PASSWORD }}'
|
||||||
- uses: ravsamhq/notify-slack-action@v1
|
- name: Failure Notification
|
||||||
|
uses: ravsamhq/notify-slack-action@2.5.0
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
|
notification_title: '{workflow} has {status_message}'
|
||||||
|
message_format: '{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>, ${{ secrets.SITE_URL }} may be down. '
|
||||||
env:
|
env:
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.J40_TOOL_MONITORING_SLACK_ALERTS }}
|
SLACK_WEBHOOK_URL: ${{ secrets.J40_TOOL_MONITORING_SLACK_ALERTS }}
|
Loading…
Add table
Reference in a new issue