Docker: Delete all containers from package without tags #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Docker: Delete all containers from package without tags' | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
# Scan the image regularly (once a day). | |
- cron: '44 4 * * *' | |
jobs: | |
build: | |
permissions: | |
contents: read # For actions/checkout to fetch code. | |
security-events: write # For github/codeql-action/upload-sarif to upload SARIF results. | |
name: Delete all containers from package without tags | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry with PAT_TOKEN | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.PAT_TOKEN }} | |
- name: Delete all containers from package without tags | |
uses: Chizkiyahu/delete-untagged-ghcr-action@v2 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
repository_owner: ${{ github.repository_owner }} | |
repository: ${{ github.repository }} | |
package_name: movim | |
untagged_only: true | |
owner_type: user | |
except_untagged_multiplatform: true |