Skip to content

Commit

Permalink
Add back container image cleanup steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mtneug committed Jul 12, 2024
1 parent f25e538 commit 3d8dcab
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/container-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,21 @@ jobs:
VERSION=${{ steps.info.outputs.VERSION }} \
IMAGE_PLATFORMS=${{ env.IMAGE_PLATFORMS }} \
BUILDX_OUTPUT="${BUILDX_OUTPUT}"
- name: fetch container image shas
id: container-image
run: |
shas=$(docker manifest inspect ghcr.io/nagare-media/engine/${{ matrix.image }}:${{ steps.info.outputs.VERSION }} | jq -r '.manifests.[] | .digest' | paste -s -d ' ' -)
echo "SHAS=$shas" | tee -a "$GITHUB_OUTPUT"
- name: delete untagged container images
uses: snok/container-retention-policy@v3.0.0
if: ${{ github.event_name == 'push' }}
with:
account: nagare-media
token: ${{ secrets.GITHUB_TOKEN }}
tag-selection: untagged
image-names: engine/${{ matrix.image }}
image-tags: ${{ steps.info.outputs.VERSION }}
skip-shas: ${{ steps.container-image.outputs.SHAS }}
cut-off: 0s

0 comments on commit 3d8dcab

Please sign in to comment.