Skip to content

Commit

Permalink
add clean job
Browse files Browse the repository at this point in the history
to remove untagged images from the GitHub package registry
  • Loading branch information
peterstadler committed Oct 2, 2024
1 parent 0dd4167 commit 41d6cd2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

jobs:
build:

name: build the Docker image
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -67,3 +67,16 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
build-args: ${{ contains(github.ref, 'blogpost') && 'BUILD_SCRIPT=build-drafts' || 'BUILD_SCRIPT=build' }}
labels: ${{ steps.meta.outputs.labels }}

clean:
name: remove untagged images from Github package registry
runs-on: ubuntu-latest
needs: docker
steps:
- name: Delete Package Versions
uses: actions/[email protected]
with:
package-name: 'vife-website'
package-type: 'container'
min-versions-to-keep: 10
delete-only-untagged-versions: 'true'

0 comments on commit 41d6cd2

Please sign in to comment.