diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 6275740..2fd8487 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -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 diff --git a/.gitignore b/.gitignore index b0c2a54..328e87f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ logs # wrangler files .wrangler .dev.vars +.vercel \ No newline at end of file