From 1e0f206f595671193fba5d52250e5a96d9c37d1b Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Wed, 30 Aug 2023 17:25:38 +0100 Subject: [PATCH] Update remove-untagged.yml --- .github/workflows/remove-untagged.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/remove-untagged.yml b/.github/workflows/remove-untagged.yml index 306f680..3fb3689 100644 --- a/.github/workflows/remove-untagged.yml +++ b/.github/workflows/remove-untagged.yml @@ -21,7 +21,7 @@ jobs: { per_page: ${{ env.PER_PAGE }} }); for(version of response.data) { - if (version.metadata.container.tags.length == 0) { + if (version.metadata.container.tags.length == 0 && version.name !== "latest" && version.name !== "preview") { console.log("Delete " + version.id) const deleteResponse = await github.request("DELETE /orgs/${{ github.repository_owner }}/packages/container/${{ matrix.image-name }}/versions/" + version.id, { });