Automate cleanup of transient deployments. Remove Git tags, branches, Docker images, Helm charts, Kubernetes resources, and GitHub deployments with ease.
One action to clean up all your transient deployment artifacts
Automatically find and delete Git tags matching your environment patterns.
Remove Docker images from GitHub Container Registry by version tag.
Clean up Helm chart versions from GHCR with charts/ prefix support.
Delete GitHub deployments, environments, and branches.
Add this to your workflow to clean up PR deployments
name: Cleanup PR Environment
on:
pull_request:
types: [closed]
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cleanup PR artifacts
uses: starburst997/cleanup-transient@v1
with:
pattern: pr-${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
Complete action inputs and outputs documentation