From 8e7c64cd314162ddb3ae24a0fe90e85f09436f33 Mon Sep 17 00:00:00 2001 From: AtomicFS Date: Wed, 21 Feb 2024 11:37:22 +0100 Subject: [PATCH] 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](https://github.com/actions/delete-package-versions/pull/104) Signed-off-by: AtomicFS --- .github/workflows/docker-build-and-test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/docker-build-and-test.yml b/.github/workflows/docker-build-and-test.yml index 955a5613..b2152265 100644 --- a/.github/workflows/docker-build-and-test.yml +++ b/.github/workflows/docker-build-and-test.yml @@ -45,6 +45,23 @@ jobs: 'udk2017' ] steps: + - 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: