Skip to content

Commit

Permalink
ci: delete old packages
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
AtomicFS committed Mar 4, 2024
1 parent c5a0111 commit c169a50
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docker-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ jobs:
'udk2017'
]
steps:
# 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
# We can switch to upstream whe following PRs get merged:
# - [dry-run](https://github.com/actions/delete-package-versions/pull/119/commits)
# - [tags](https://github.com/actions/delete-package-versions/pull/104
- name: Delete old packages
uses: AtomicFS/delete-package-versions@main
with:
package-name: firmware-action/${{ matrix.dockerfile }}
package-type: container
min-versions-to-keep: 5
ignore-versions: '^(main|latest|v(\d+\.?)+)$'
# ignore:
# - main
# - latest
# - vX
# - vX.X
# - vX.X.X
#delete-only-untagged-versions: true
dry-run: false
ignore-versions-include-tags: true

- name: Setup python
uses: actions/setup-python@v5
with:
Expand Down

0 comments on commit c169a50

Please sign in to comment.