File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ local GH_REPO=$3
88
99while : ; do
1010 JSON_OUTPUT=$( curl \
11- -H " Accept: application/vnd.github.v3+json" \
12- -H " Authorization: token $GH_TOKEN " \
11+ -H " Accept: application/vnd.github+json" \
12+ -H " Authorization: Bearer $GH_TOKEN " \
13+ -H " X-GitHub-Api-Version: 2022-11-28" \
1314 https://api.github.com/repos/$GH_ONWER /$GH_REPO /actions/caches)
1415
1516 GH_CACHE_IDS=$( echo " $JSON_OUTPUT " | jq ' .actions_caches[] | {id: .id}' | grep " id" | cut -d ' :' -f 2 | cut -c 2-)
@@ -22,10 +23,11 @@ while :; do
2223
2324 for GH_CACHE_ID in $GH_CACHE_IDS ; do
2425 echo " Delete Cache-ID: $GH_CACHE_ID "
25- curl \
26+ curl -L \
2627 -X DELETE \
27- -H " Accept: application/vnd.github.v3+json" \
28- -H " Authorization: token $GH_TOKEN " \
28+ -H " Accept: application/vnd.github+json" \
29+ -H " Authorization: Bearer $GH_TOKEN " \
30+ -H " X-GitHub-Api-Version: 2022-11-28" \
2931 https://api.github.com/repos/$GH_ONWER /$GH_REPO /actions/caches/$GH_CACHE_ID
3032 done
3133
You can’t perform that action at this time.
0 commit comments