From 40ddaa3db2f77394dd688514861741351205d339 Mon Sep 17 00:00:00 2001 From: NianBroken Date: Tue, 7 May 2024 17:37:04 +0800 Subject: [PATCH] Added GitHub Actions workflow for clearing JSdelivr cache --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 429aa86..3a23050 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -131,9 +131,10 @@ jobs: git commit -m "Update from GitHub Actions" || true git push origin main --force - - name: Send Requests + - name: Send GET requests run: | - for i in {1..50}; do - response=$(curl -X GET -s -o /dev/null -w "%{http_code}" https://purge.jsdelivr.net/gh/NianBroken/ZFCheckScores/img/$i.png) - echo "Response for img/$i.png: $response" + for i in {1..50} + do + response=$(curl -X GET "https://purge.jsdelivr.net/gh/NianBroken/ZFCheckScores/img/$i.png") + echo "$response" done \ No newline at end of file