From d8c735d05c686ce96a7f2080d66f7892367c69aa Mon Sep 17 00:00:00 2001 From: igts-moksha <101736639+igts-moksha@users.noreply.github.com> Date: Sat, 9 Nov 2024 13:02:36 +0530 Subject: [PATCH] Create main.yml To stop server cold boots --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 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..4ee627a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: Scheduled GET Request + +on: + schedule: + # This cron expression runs the workflow every 5 minutes + - cron: '*/5 * * * *' + workflow_dispatch: # Allows manual trigger of the workflow +jobs: + get-api-request: + runs-on: ubuntu-latest + steps: + # Step to make the GET request + - name: Make GET API Request and Log Response + run: | + response=$(curl -s -X GET https://igts-back.onrender.com/api/blog/getallblogs/0) + echo "Response: $response"