From c4de6c402b09c7fafda8a578b26d70cc881d0aa5 Mon Sep 17 00:00:00 2001 From: Antonio Vivace Date: Wed, 4 Dec 2024 18:57:43 +0100 Subject: [PATCH] ci: clean up untagged artifacts --- .github/workflows/build-container.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 5ee59f71..bcf903af 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -42,3 +42,39 @@ jobs: sed -i "2i LABEL org.opencontainers.image.description=\"RGBDS container image for the release version $TAG_NAME\"" Dockerfile docker build . --tag ghcr.io/gbdev/rgbds:$TAG_NAME docker push ghcr.io/gbdev/rgbds:$TAG_NAME + - name: Delete untagged ghcr + uses: Chizkiyahu/delete-untagged-ghcr-action@v5 + with: + # Personal access token (PAT) used to fetch the repository. The PAT is configured + # with the local git config, which enables your scripts to run authenticated git + # commands. The post-job step removes the PAT. + # needs delete:packages permissions + # required: true + # [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) + token: ${{ secrets.PAT_TOKEN }} + # Repository name or name with owner + # Delete only from repository name + # Default: ${{ github.repository }} + repository: 'rgbds' + # 'The repository owner name' + # Default: ${{ github.repository_owner }} + repository_owner: 'gbdev' + # 'The package names' + # Delete only from comma separated package names + # required: false + package_name: 'rgbds' + # Delete only package versions without tag + # required: false + # Default: true + # choices: true, false + untagged_only: true + # Exclude untagged multiplatform packages from deletion + # Manifests are usually such packages so they should be excluded + # only for untagged_only=true + # Default: true + # needs docker installed + except_untagged_multiplatform: true + # the owner type + # required: true + # choices: org, user + owner_type: 'org'