Create a GH workflow to cleanup the GH cache - #6080
Merged
Merged
Conversation
stnguyen90
marked this pull request as ready for review
August 30, 2023 22:41
stnguyen90
force-pushed
the
feat-github-cache
branch
from
August 30, 2023 22:42
6264f45 to
9e46d3c
Compare
christyjacob4
approved these changes
Aug 30, 2023
stnguyen90
force-pushed
the
feat-github-cache
branch
from
August 30, 2023 22:56
9e46d3c to
471eedb
Compare
abnegate
reviewed
Aug 30, 2023
| BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
|
|
||
| echo "Fetching list of cache key" | ||
| cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) |
Member
There was a problem hiding this comment.
I think if we remove -L 100 it will clear the entire cache instead of only the oldest 100
Contributor
Author
There was a problem hiding this comment.
Default limit is 30. Max limit is 100: https://github.com/actions/gh-actions-cache#list
Member
There was a problem hiding this comment.
Can we paginate and delete them all?
The GitHub actions cache is helpful to speed up CI jobs. Once a branch is closed, we don't need the cacche anymore so we should delete it so the disk space can be reclaimed. This workflow was copied from https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries.
stnguyen90
force-pushed
the
feat-github-cache
branch
from
August 30, 2023 23:56
471eedb to
8a0bf3a
Compare
2 tasks
This was referenced Sep 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The GitHub actions cache is helpful to speed up CI jobs. Once a branch is closed, we don't need the cacche anymore so we should delete it so the disk space can be reclaimed.
This workflow was copied from https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries.
Test Plan
https://github.com/appwrite/appwrite/actions/runs/6031274668/job/16364664657?pr=6080
Related PRs and Issues
None
Checklist