-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (35 loc) · 1.02 KB
/
pr_closure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: PR closure
on:
pull_request:
branches:
- main
types:
- closed
jobs:
delete_preview_app:
name: Delete preview app
runs-on: ubuntu-latest
concurrency:
group: pr-${{ github.event.number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Delete preview app
uses: optimumBA/fly-preview-apps@main
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
REPO_NAME: phx_tools
with:
name: phx-tools-pr-${{ github.event.number }}
- name: Generate token
uses: navikt/[email protected]
id: generate_token
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Delete GitHub environment
uses: strumwolf/[email protected]
with:
token: ${{ steps.generate_token.outputs.token }}
environment: pr-${{ github.event.number }}
ref: ${{ github.head_ref }}