diff --git a/.github/workflows/action-cache-cleanup.yml b/.github/workflows/action-cache-cleanup.yml index 05e14bc0f7..65ab17f004 100644 --- a/.github/workflows/action-cache-cleanup.yml +++ b/.github/workflows/action-cache-cleanup.yml @@ -12,14 +12,16 @@ jobs: - name: Cleanup run: | gh extension install actions/gh-actions-cache - echo ""Fetching list of cache key"" - cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) + echo "Fetching list of cache key" + + cacheKeysForPR=$(gh actions-cache list -R "$REPO" -B "$BRANCH" -L 100 | cut -f 1 ) + ## Setting this to not fail the workflow while deleting cache keys. set +e echo "Deleting caches..." for cacheKey in $cacheKeysForPR do - gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + gh actions-cache delete $cacheKey -R "$REPO" -B "$BRANCH" --confirm done echo "Done" env: