chore(deps): bump ubuntu from 1e622c5 to 6015f66 in amp-devcontainer-cpp
#444
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| 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: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - 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 }} |