Skip to content

Commit

Permalink
pipeline fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rajpreet-s committed Jul 1, 2024
1 parent 46e2501 commit 6c5d279
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ jobs:
run: |
# Use the package-lock-hash from the setup job
CACHE_KEY="${{ needs.setup.outputs.package-lock-hash }}"
# Get the cache ID
CACHE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/actions/caches | jq -r ".actions_caches[] | select(.key == \"$CACHE_KEY\") | .id")
if [ -n "$CACHE_ID" ]; then
gh api --method DELETE -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/actions/caches/$CACHE_ID
if [ -n "$CACHE_KEY" ]; then
gh api \
--method DELETE \
-H "Accept: application/vnd.github+json" \
"/repos/${{ github.repository }}/actions/caches/$CACHE_KEY"
echo "Cache deleted successfully"
else
echo "No matching cache found"
Expand Down

0 comments on commit 6c5d279

Please sign in to comment.