Skip to content

Commit

Permalink
updated ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinaPieri committed Aug 11, 2023
1 parent 9a47ed0 commit b5ec080
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Expand Up @@ -82,15 +82,11 @@ jobs:
REPO=${{ github.repository }}
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO)
cacheKey=${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}}
## 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 --confirm
done
cache_delete=$(gh actions-cache delete $cacheKey -R $REPO --confirm | grep "Deleted 1 cache entry with key")
echo $cache_delete
[[ -z "$cache_delete" ]] && exit 1 || echo "Cache Delete Successful"
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b5ec080

Please sign in to comment.