mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-21 14:51:40 -07:00
Add action for ping test and alert to Slack (#695)
* Add action for ping test and alert to Slack Based on @sverchdotgov 's https://github.com/sverchdotgov/github-actions-experiments/blob/master/.github/workflows/scheduled-email.yml This is set to run every hour. We can modify as needed. It is also using our cloudfront URL and we'll need to change this to our new URL once we have it. * Update main.yml Change to run every 5 minutes and update env var to be more descriptive based on PR convo
This commit is contained in:
parent
a1a988da46
commit
c457ba85db
1 changed files with 33 additions and 0 deletions
33
.github/workflows/main.yml
vendored
Normal file
33
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# .github/workflows/ping-test.yml
|
||||||
|
name: Trigger Run of site ping test
|
||||||
|
on:
|
||||||
|
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||||
|
schedule:
|
||||||
|
# Run every five minutes
|
||||||
|
- cron: '*/5 * * * *'
|
||||||
|
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
logLevel:
|
||||||
|
description: 'Log level'
|
||||||
|
required: true
|
||||||
|
default: 'warning'
|
||||||
|
tags:
|
||||||
|
description: 'Ping test'
|
||||||
|
jobs:
|
||||||
|
sitePingCheck:
|
||||||
|
name: Slack Notification
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
# https://github.com/marketplace/actions/ping-my-site
|
||||||
|
- uses: Leocardoso94/is-my-site-up@v1.2
|
||||||
|
with:
|
||||||
|
site: "https://d2zjid6n5ja2pt.cloudfront.net/justice40-tool/main/en/"
|
||||||
|
# https://www.ravsam.in/blog/send-slack-notification-when-github-actions-fails/
|
||||||
|
- uses: ravsamhq/notify-slack-action@v1
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.J40_TOOL_MONITORING_SLACK_ALERTS }}
|
Loading…
Add table
Add a link
Reference in a new issue