From c7c8775a490194712c4c5fe3d0631e4492b0fa7b Mon Sep 17 00:00:00 2001 From: Tam Mullen Date: Mon, 18 Apr 2022 19:30:06 +0100 Subject: [PATCH] Adding workflow to check status of site used for daily smoke tests. --- .../workflows/smoke-test-daily-site-check.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/smoke-test-daily-site-check.yml diff --git a/.github/workflows/smoke-test-daily-site-check.yml b/.github/workflows/smoke-test-daily-site-check.yml new file mode 100644 index 00000000000..dcd1277f7bb --- /dev/null +++ b/.github/workflows/smoke-test-daily-site-check.yml @@ -0,0 +1,23 @@ +name: Check daily smoke test site status. +on: + push: + +jobs: + ping_site: + runs-on: ubuntu-latest + name: Check site and notify if not found + steps: + - name: Check site status + id: sitecheck + uses: srt32/uptime@958231f4d95c117f08eb0fc70907e80d0dfedf2b + with: + url-to-hit: "${{ secrets.SMOKE_TEST_URL }}ready/" + expected-statuses: "200,301" + - name: Send message to Slack API + if: failure() + uses: archive/github-actions-slack@deecc2edc496dc642d643de1d7cf3a47f51fb27a + id: notify + with: + slack-bot-user-oauth-access-token: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }} + slack-channel: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }} + slack-text: ':warning: FYI the URL ${{ secrets.SMOKE_TEST_URL }}ready/ appears to be returning `404 not found` :x:'