Skip to content

Commit

Permalink
token: ${{ secrets.GITHUB_TOKEN }}
Browse files Browse the repository at this point in the history
  • Loading branch information
jlestel authored Nov 21, 2023
1 parent eeed0a1 commit 252bac6
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/ghcr_purge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,25 @@ permissions:
packages: write

jobs:
purge-pr-untagged:
name: Delete untagged images from ghcr.io
purge-pr-package:
name: Delete images from ghcr.io when PR is closed
runs-on: ubuntu-latest

steps:
- uses: chipkent/[email protected]
name: Delete PR image from ghcr.io
id: cleanup
continue-on-error: true
with:
package-name: ${{ github.event.repository.name }}
tag: pr-${{ github.event.pull_request.number }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/delete-package-versions@v4
if: job.steps.cleanup.status == success()
name: Delete untagged images from ghcr.io
continue-on-error: true
with:
package-name: "teslamate"
package-type: "container"
min-versions-to-keep: 0
delete-only-untagged-versions: "true"
token: ${{ secrets.GITHUB_TOKEN }}

purge-pr-package:
name: Delete image from ghcr.io
runs-on: ubuntu-latest

steps:
- uses: chipkent/[email protected]
with:
package-name: ${{ github.event.repository.name }}
tag: pr-${{ github.event.pull_request.number }}
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 252bac6

Please sign in to comment.