From 515cf923f22a102d84c82d585f9a4537adcbb45f Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 14 Nov 2024 11:51:21 +0100 Subject: [PATCH] github: cleanup chgr --- .github/workflows/github-cleanup.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/github-cleanup.yml diff --git a/.github/workflows/github-cleanup.yml b/.github/workflows/github-cleanup.yml new file mode 100644 index 0000000..84dab59 --- /dev/null +++ b/.github/workflows/github-cleanup.yml @@ -0,0 +1,32 @@ +--- +name: github-cleanup +on: + schedule: + - cron: '30 2 * * *' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + inputs: + dryrun: + description: dry-run execution, default 'false' + required: true + default: false + type: boolean +env: + REGISTRY_NAME: ghcr.io + IMAGE_NAME: kamailio + REGISTRY_IMAGE: kamailio/kamailio +jobs: + clean: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Cleanup ghcr + uses: quartx-analytics/ghcr-cleaner@v1 + with: + owner-type: org + token: ${{ secrets.CLEAN_PACKAGES }} + repository-name: ${{ github.repository }} + delete-untagged: true + dry-run: ${{ github.event.inputs.dryrun }}