Open danoli3 opened 1 month ago
Added cleanup on PR close again should help fix some of the issues
current cache cleaning not working:
gh extension install actions/gh-actions-cache
REPO=openframeworks/openFrameworks
BRANCH="refs/pull/8007/merge"
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
done
echo "Done"
shell: /usr/bin/bash -e {0}
env:
GH_TOKEN: ***
Fetching list of cache key
Deleting caches...
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Error: Resource not accessible by integration
Done
Looks like we haven't been cleaning up caches
Cache list : https://github.com/openframeworks/openFrameworks/actions/caches
https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries
Shall test adding cache clean to PR on close