Skip to content

chore(deps): bump conan from 2.8.1 to 2.9.1 in amp-devcontainer-cpp #282

chore(deps): bump conan from 2.8.1 to 2.9.1 in amp-devcontainer-cpp

chore(deps): bump conan from 2.8.1 to 2.9.1 in amp-devcontainer-cpp #282

---
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@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.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 }}