diff --git a/.github/workflows/delete-untagged-image.yml b/.github/workflows/delete-untagged-image.yml new file mode 100644 index 0000000..cf2d28b --- /dev/null +++ b/.github/workflows/delete-untagged-image.yml @@ -0,0 +1,23 @@ +name: Cleanup Untagged Images + +on: + # every sunday at 00:00 + schedule: + - cron: "0 0 * * SUN" + # or manually + workflow_dispatch: + +jobs: + delete-untagged-images: + name: Delete Untagged Images + runs-on: ubuntu-latest + steps: + - uses: bots-house/ghcr-delete-image-action@v1.1.0 + with: + # NOTE: at now only orgs is supported + owner: bots-house + name: some-web-service + # NOTE: using Personal Access Token + token: ${{ secrets.PAT }} + # Keep latest N untagged images + untagged-keep-latest: 3