diff options
Diffstat (limited to 'fluent-bit/.github/workflows/pr-closed-docker.yaml')
-rw-r--r-- | fluent-bit/.github/workflows/pr-closed-docker.yaml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fluent-bit/.github/workflows/pr-closed-docker.yaml b/fluent-bit/.github/workflows/pr-closed-docker.yaml new file mode 100644 index 00000000..628f5e92 --- /dev/null +++ b/fluent-bit/.github/workflows/pr-closed-docker.yaml @@ -0,0 +1,21 @@ +name: Remove docker images for stale/closed PR(s). +on: + pull_request: + branches: + - master + types: [closed] +jobs: + cleanup: + name: PR - cleanup pr-${{ github.event.number }} images + runs-on: ubuntu-latest + permissions: + # We may need a specific token here with `packages:admin` privileges which is not available to GITHUB_TOKEN + packages: write + steps: + - uses: vlaurin/action-ghcr-prune@v0.5.0 + with: + organization: fluent + container: fluent-bit/pr-${{ github.event.number }} + token: ${{ secrets.GITHUB_TOKEN }} + prune-untagged: true + keep-last: 0 |