Last active
February 20, 2024 13:49
-
-
Save BolajiAyodeji/ceea27d6312750a599f4066ce3ae0c86 to your computer and use it in GitHub Desktop.
Automatically delete unused deployments and environments on GitHub.
This file contains 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: Delete Environment | |
on: | |
push: | |
branches: [main, beta, alpha] | |
jobs: | |
delete: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: strumwolf/delete-deployment-environment@v2 | |
with: | |
# ⚠️ The provided token needs permission for admin write:org. | |
token: ${{ secrets.CLEANUP_TOKEN }} | |
# specify the environment name here. | |
environment: staging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment