docker-pi-hole/.github/workflows/housekeeping.yml

28 lines
1012 B
YAML

name: housekeeping
on:
workflow_dispatch:
jobs:
housekeeping:
runs-on: ubuntu-latest
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GitHub Container Registry with PAT_TOKEN
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_TOKEN }}
-
name: Delete all containers from repository without tags
uses: Chizkiyahu/delete-untagged-ghcr-action@v3
with:
token: ${{ secrets.PAT_TOKEN }}
repository_owner: ${{ github.repository_owner }}
repository: ${{ github.repository }}
untagged_only: true
owner_type: org # or user
except_untagged_multiplatform: true