Skip to content

Commit

Permalink
feat: add some debugging to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mgierada committed May 29, 2024
1 parent dd86d48 commit 4f387c8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/increment.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: Daily increment
name: Daily Increment

on:
schedule:
# - cron: "0 7 * * *"
# - cron: "0 9 * * *"
- cron: "*/5 * * * *"

jobs:
call-endpoint:
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

0 comments on commit 4f387c8

Please sign in to comment.