From 82d8d9fef75890d85c1378c1f2c5963649a3d027 Mon Sep 17 00:00:00 2001 From: Ryan McNally Date: Sat, 24 Aug 2024 16:49:57 +0100 Subject: [PATCH] Added healthcheck action --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ac02459 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +# This workflow hits an endpoint of our bowlby instance and fails if we don't get a success response + +name: health + +on: + workflow_dispatch: + schedule: + - cron: '0 8 * * *' + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Send HTTP request + id: request + uses: tyrrrz/action-http-request@master + with: + url: https://bowlby.flowty.dev/self/latest/therealryan/bowlby/testing.yml/flow_execution_reports/app/target/mctf/latest/index.html + method: GET + retry-count: 3 + retry-delay: 500 + + - name: Fail on non-200 + if: ${{ steps.request.outputs.status }} != 1000 + run: | + echo "::error file={name},line={line},endLine={endLine},title={title}::{message}" + exit 1