delete deploy

This commit is contained in:
我若为王 2024-12-10 10:41:34 +08:00
parent 5ff0791580
commit 9f19837199
2 changed files with 24 additions and 0 deletions

View File

@ -23,6 +23,29 @@ jobs:
runs-on: ubuntu-latest
steps:
# Points to a recent commit instead of `main` to avoid supply chain attacks. (The latest tag is very old.)
- name: 🎟 Get GitHub App token
uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
id: get-token
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Delete workflow runs for current repo
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 7
keep_minimum_runs: 6
- name: Delete deployment
uses: strumwolf/delete-deployment-environment@v2.3.0
with:
token: ${{ steps.get-token.outputs.token }}
environment: Preview
onlyRemoveDeployments: true
- name: Checkout repository
uses: actions/checkout@v2

1
.gitignore vendored
View File

@ -26,3 +26,4 @@ logs
# wrangler files
.wrangler
.dev.vars
.vercel