Skip to content

Commit

Permalink
feat: add container cleanup cronjob
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Baker <[email protected]>
  • Loading branch information
rbtr authored Mar 27, 2024
1 parent 5298eaa commit 6f508b0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/container-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Release Retina Charts

on:
push:
branches: [main]
tags: ["v*"]

permissions:
Expand Down Expand Up @@ -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

0 comments on commit 6f508b0

Please sign in to comment.