Skip to content

Commit 05f2d97

Browse files
committed
ci: delete old packages
- 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 <vojtech.vesely@9elements.com>
1 parent 8499f36 commit 05f2d97

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/docker-build-and-test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,28 @@ jobs:
4545
'udk2017'
4646
]
4747
steps:
48+
# We have to use my own fork of actions/delete-package-versions at the moment
49+
# to have access to 'dry-run' and 'ignore-versions-include-tags' features
50+
# We can switch to upstream whe following PRs get merged:
51+
# - [dry-run](https://github.com/actions/delete-package-versions/pull/119/commits)
52+
# - [tags](https://github.com/actions/delete-package-versions/pull/104
53+
- name: Delete old packages
54+
uses: AtomicFS/delete-package-versions@main
55+
with:
56+
package-name: firmware-action/${{ matrix.dockerfile }}
57+
package-type: container
58+
min-versions-to-keep: 5
59+
ignore-versions: '^(main|latest|v(\d+\.?)+)$'
60+
# ignore:
61+
# - main
62+
# - latest
63+
# - vX
64+
# - vX.X
65+
# - vX.X.X
66+
#delete-only-untagged-versions: true
67+
dry-run: false
68+
ignore-versions-include-tags: true
69+
4870
- name: Setup python
4971
uses: actions/setup-python@v5
5072
with:

0 commit comments

Comments
 (0)