From 4f387c89e85ce8382c380a980006947d33ba6c1f Mon Sep 17 00:00:00 2001 From: Maciej Gierada Date: Wed, 29 May 2024 10:24:35 +0200 Subject: [PATCH] feat: add some debugging to workflow --- .github/workflows/increment.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/increment.yml b/.github/workflows/increment.yml index 93dbe01..b32fa77 100644 --- a/.github/workflows/increment.yml +++ b/.github/workflows/increment.yml @@ -1,8 +1,8 @@ -name: Daily increment +name: Daily Increment on: schedule: - # - cron: "0 7 * * *" + # - cron: "0 9 * * *" - cron: "*/5 * * * *" jobs: @@ -10,7 +10,15 @@ jobs: runs-on: ubuntu-latest steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Make HTTP request run: | - curl -X POST "https://ohno-server.fly.dev/increment" \ - -H "Content-Type: application/json" + response=$(curl -s -o response.txt -w "%{http_code}" -X POST "https://ohno-server.fly.dev/increment" \ + -H "Content-Type: application/json") + cat response.txt + if [ "$response" -ne 200 ]; then + echo "Request failed with status code $response" + exit 1 + fi