-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add action to clean nightly assets #1371
Add action to clean nightly assets #1371
Conversation
wrote this pr too fast( busy with other items), but I wanted to ask the following:
|
Runs once a week Deletes everything besides the latest 3 months
271c0db
to
dce9b4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASSETS_TOTAL=$(ls $WORK_DIR | wc -l) | ||
echo "[INFO] Currently ${ASSETS_TOTAL} assets for nightly release" | ||
|
||
ASSETS_TO_REMOVE=$(ls $WORK_DIR | grep -v "${{ steps.currentmonth.outputs.date }}\|${{ steps.previousmonth.outputs.date }}\|${{ steps.twomonthsago.outputs.date }}" | wc -l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today I learned: grep -v
means "get everything that does not match".
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I think keeping everything from the past 3 months is fine. We can iterate further if we want to fine-tune. |
Changes
Fixes #1070 (comment)
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes