Skip to content
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

ci: delete old containers in packages #145

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Conversation

AtomicFS
Copy link
Collaborator

@AtomicFS AtomicFS commented Feb 21, 2024

  • add a step in docker-build-and-test to delete old published containers
  • should delete all but 'main', 'latest' and release containers
  • we have to use my own fork of actions/delete-package-versions at the moment to have access to dry-run and ignore-versions-include-tags features
  • dry-run
  • tags

Fixes #135

@AtomicFS AtomicFS added feature New feature or request github_actions Pull requests that update GitHub Actions code labels Feb 21, 2024
@AtomicFS AtomicFS force-pushed the feat/package_cleanup branch 5 times, most recently from 1837675 to 7442a30 Compare February 21, 2024 11:10
@AtomicFS AtomicFS changed the title ci: delete old packages ci: delete old containers in packages Feb 23, 2024
@AtomicFS AtomicFS force-pushed the feat/package_cleanup branch 2 times, most recently from d08a2ca to 4d9d50d Compare February 28, 2024 15:36
@AtomicFS
Copy link
Collaborator Author

As far as the dry-run goes, it seems to do exactly what we want.

https://github.com/9elements/firmware-action/actions/runs/8082835550/job/22084531761#step:2:62

@AtomicFS AtomicFS marked this pull request as ready for review February 28, 2024 15:40
@AtomicFS AtomicFS enabled auto-merge February 28, 2024 15:40
@AtomicFS AtomicFS requested a review from MDr164 February 28, 2024 15:40
@AtomicFS
Copy link
Collaborator Author

FYI there are many versions right now. Most of them are useless.

Untagged can be deleted right-away. Tagged, I would only keep the most important ones.

container tagged untagged
udk2017 56 3
edk2-stable202105 53 3
edk2-stable202211 53 3
edk2-stable202208 52 3
edk2-stable202008 54 3
edk2-stable202111 53 3
edk2-stable202205 53 3
coreboot_4.19 50 3
coreboot_4.22.01 12 3
coreboot_4.21 38 3
coreboot_4.20.1 38 3
linux_6.1.45 41 3

@AtomicFS AtomicFS force-pushed the feat/package_cleanup branch from 4d9d50d to 8e7c64c Compare February 29, 2024 09:21
Copy link
Collaborator

@MDr164 MDr164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Should we note somewhere inside the yaml why the fork was necessary? Maybe link the PRs or issues from upstream so we can hopefully switch back to upstream at some point.

@AtomicFS
Copy link
Collaborator Author

AtomicFS commented Mar 1, 2024

Yeah, that is a good idea.

@AtomicFS AtomicFS force-pushed the feat/package_cleanup branch from 8e7c64c to 05f2d97 Compare March 1, 2024 17:28
@AtomicFS AtomicFS requested a review from MDr164 March 1, 2024 17:32
Copy link
Collaborator

@MDr164 MDr164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let's hope dry-run worked the way it was intended. :D

@AtomicFS AtomicFS added this pull request to the merge queue Mar 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 4, 2024
@MDr164
Copy link
Collaborator

MDr164 commented Mar 4, 2024

Needs to be rebased on top of #161 to satisfy merge queue again

- add a step in docker-build-and-test to delete old published containers
- should delete all but 'main', 'latest' and release containers
- we have to use my own fork of actions/delete-package-versions
  at the moment to have access to 'dry-run' and
  'ignore-versions-include-tags' features
- [dry-run](https://github.com/actions/delete-package-versions/pull/119/commits)
- [tags](actions/delete-package-versions#104)

Signed-off-by: AtomicFS <[email protected]>
@AtomicFS AtomicFS force-pushed the feat/package_cleanup branch from 05f2d97 to c169a50 Compare March 4, 2024 15:39
@AtomicFS AtomicFS enabled auto-merge March 4, 2024 15:39
@AtomicFS AtomicFS added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit d49be74 Mar 4, 2024
17 checks passed
@AtomicFS AtomicFS deleted the feat/package_cleanup branch March 4, 2024 15:57
@AtomicFS
Copy link
Collaborator Author

AtomicFS commented Mar 4, 2024

screenshot_2024-03-04_17-11-05-820389675
Seems it worked like a charm :)
Down to 8 containers from 50+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup published containers
2 participants