From b5f042e7191d042f92290d88c69807f8bd96386c Mon Sep 17 00:00:00 2001 From: Rajpreet Singh Date: Mon, 1 Jul 2024 12:00:24 +0000 Subject: [PATCH] removed gh and used curl in workflow --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 575a564..a7449cc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,10 +79,13 @@ jobs: CACHE_KEY="${{ needs.setup.outputs.package-lock-hash }}" if [ -n "$CACHE_KEY" ]; then - gh api \ - --method DELETE \ + curl -L \ + -X DELETE \ -H "Accept: application/vnd.github+json" \ - "/repos/${{ github.repository }}/actions/caches/$CACHE_KEY" + -H "Authorization: token $GH_TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${{ github.repository }}/actions/caches/$CACHE_KEY" + echo "Cache deleted successfully" else echo "No matching cache found"