Skip to content

ci: recursively sign digest i.s.o. tags #58

ci: recursively sign digest i.s.o. tags

ci: recursively sign digest i.s.o. tags #58

name: Cleanup Pull-Request Image
on:
pull_request:
types: [closed]
permissions:
contents: read
env:
REGISTRY: ghcr.io
jobs:
delete-images:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: cosign clean -f --type=signature "${{ env.REGISTRY }}/${{ github.repository }}:pr-${{ github.event.pull_request.number }}"
- uses: bots-house/ghcr-delete-image-action@3827559c68cb4dcdf54d813ea9853be6d468d3a4 # v1.1.0
with:
owner: ${{ github.repository_owner }}
name: ${{ github.event.repository.name }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-${{ github.event.pull_request.number }}