From 86106d419254d653f6faa7048fde12aa54edb665 Mon Sep 17 00:00:00 2001 From: Plenty Su Date: Wed, 27 Dec 2023 10:46:37 +0900 Subject: [PATCH] Add a workflow to remove untagged images regularly (#26) --- .github/workflows/remove-untagged-images.yaml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/remove-untagged-images.yaml diff --git a/.github/workflows/remove-untagged-images.yaml b/.github/workflows/remove-untagged-images.yaml new file mode 100644 index 0000000..aa3f20d --- /dev/null +++ b/.github/workflows/remove-untagged-images.yaml @@ -0,0 +1,22 @@ +# When we push a new SNAPSHOT image, the old SNAPSHOT image remains as an untagged +# image in GitHub Packages. We remove those untagged images by using this workflow. + +name: Remove untagged images + +on: + schedule: + # UTC + - cron: '0 3 * * 1' + workflow_dispatch: + +jobs: + remove-untagged-container-images: + runs-on: ubuntu-latest + + steps: + + - name: scalar-admin-for-kubernetes + uses: camargo/delete-untagged-action@v1 + with: + github-token: ${{ secrets.CR_PAT }} + package-name: scalar-admin-for-kubernetes