Skip to content

chore(deps, cpp): update docker cli from v27.0.3 to v27.3.1 #233

chore(deps, cpp): update docker cli from v27.0.3 to v27.3.1

chore(deps, cpp): update docker cli from v27.0.3 to v27.3.1 #233

---
name: Cleanup Pull Request Images
on:
pull_request:
types: [closed]
permissions:
contents: read
env:
REGISTRY: ghcr.io
jobs:
delete-images:
runs-on: ubuntu-latest
strategy:
matrix:
flavor: ["cpp", "rust"]
permissions:
packages: write
steps:
- uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
- uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: cosign clean -f --type=signature "${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.flavor }}: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 }}-${{ matrix.flavor }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: pr-${{ github.event.pull_request.number }}
cleanup-cache:
runs-on: ubuntu-latest
permissions:
# actions: write permission is required to delete the cache
actions: write
steps:
- run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
## Setting this to not fail the workflow while deleting cache keys.
set +e
for cacheKey in $(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1)
do
gh actions-cache delete "$cacheKey" -R $REPO -B $BRANCH --confirm
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}