Skip to content

chore(deps): bump ubuntu from 728785b to 66460d5 in /.devcontainer/cpp #616

chore(deps): bump ubuntu from 728785b to 66460d5 in /.devcontainer/cpp

chore(deps): bump ubuntu from 728785b to 66460d5 in /.devcontainer/cpp #616

---
name: Cleanup Pull Request Images
on:
pull_request:
types: [closed]
permissions: {}
jobs:
delete-images:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
disable-sudo: true
egress-policy: audit
- uses: dataaxiom/ghcr-cleanup-action@cd0cdb900b5dbf3a6f2cc869f0dbb0b8211f50c4 # v1.0.16
with:
delete-tags: pr-${{ github.event.pull_request.number }}
packages: amp-devcontainer,amp-devcontainer-cpp,amp-devcontainer-rust
cleanup-cache:
runs-on: ubuntu-latest
permissions:
# actions: write permission is required to delete the cache
actions: write
steps:
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
disable-sudo-and-containers: true
egress-policy: audit
- run: |
gh extension install actions/gh-actions-cache
## Setting this to not fail the workflow while deleting cache keys.
set +e
for cacheKey in $(gh actions-cache list -R "${GH_REPO}" -B "${BRANCH}" | cut -f 1)
do
gh actions-cache delete "${cacheKey}" -R "${GH_REPO}" -B "${BRANCH}" --confirm
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge