From d128c2fb1c6ae901908fab2af9650f2bad5b9816 Mon Sep 17 00:00:00 2001 From: cmspam Date: Sat, 11 May 2024 06:21:50 +0900 Subject: [PATCH] Create prune.yaml --- .github/workflows/prune.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/prune.yaml diff --git a/.github/workflows/prune.yaml b/.github/workflows/prune.yaml new file mode 100644 index 0000000..1edf8c5 --- /dev/null +++ b/.github/workflows/prune.yaml @@ -0,0 +1,23 @@ +name: Prune Old Container Images + +on: + schedule: + - cron: '0 0 * * *' # Run daily at midnight UTC + +jobs: + prune-container-registry: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Prune old container images + uses: vlaurin/action-ghcr-prune@v0.6.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + organization: cmspam + container: incus-docker + dry-run: false + keep-younger-than: 1 # days + keep-last: 1 + prune-untagged: true