diff --git a/.github/workflows/container-cleanup.yaml b/.github/workflows/container-cleanup.yaml new file mode 100644 index 0000000000..610c0e22f9 --- /dev/null +++ b/.github/workflows/container-cleanup.yaml @@ -0,0 +1,31 @@ +name: Container Registry Cleanup + +on: + schedule: + - cron: "0 0 * * *" # every day at midnight + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + container-cleanup: + name: delete-images + runs-on: ubuntu-latest + strategy: + matrix: + image: + - "retina/charts/retina" + - "retina/kubectl-retina" + - "retina/retina-agent" + - "retina/retina-init" + - "retina/retina-operator" + steps: + - uses: port-of-rotterdam-dtis/delete-package-versions@bf25fb8df311fdcbeac67ba2e5153495d76415a8 + with: + package-name: ${{ matrix.image }} + package-type: "container" + min-versions-to-keep: 0 + ignore-versions: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$" + ignore-versions-include-tags: true diff --git a/.github/workflows/release-charts.yaml b/.github/workflows/release-charts.yaml index ec1a0cea71..2fc64e7a9d 100644 --- a/.github/workflows/release-charts.yaml +++ b/.github/workflows/release-charts.yaml @@ -2,7 +2,6 @@ name: Release Retina Charts on: push: - branches: [main] tags: ["v*"] permissions: @@ -30,4 +29,4 @@ jobs: set -euo pipefail export TAG=$(make version) helm package ./deploy/manifests/controller/helm/retina --version $TAG - helm push retina-*.tgz oci://ghcr.io/${{ github.repository }}/charts + helm push retina-$TAG.tgz oci://ghcr.io/${{ github.repository }}/charts