diff --git a/.github/workflows/prune-containers.yml b/.github/workflows/prune-containers.yml new file mode 100644 index 000000000..2d0d71175 --- /dev/null +++ b/.github/workflows/prune-containers.yml @@ -0,0 +1,19 @@ +name: Prune containers + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * SUN" # every sunday at midnight + +jobs: + clean: + runs-on: ubuntu-latest + name: Delete old images + steps: + - uses: snok/container-retention-policy@v3.0.0 + with: + account: pulibrary + image-names: figgy + token: ${{ secrets.GITHUB_TOKEN }} + image-tags: "!ci !main" + cut-off: 2w