Combine scripts #10
Workflow file for this run
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: 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 }} |