Skip to content

ci: add command for container app deletion #5

ci: add command for container app deletion

ci: add command for container app deletion #5

# The name of the deployment
name: Delete preview environments on PR close
# When this action will be executed
on:
pull_request:
types: [closed]
workflow_dispatch:
env:
PR_NUMBER: ${{ github.event.number }}
jobs:
delete-preview:
name: Delete Neon and Container App
runs-on: ubuntu-latest
steps:
- name: Delete Neon Branch
uses: neondatabase/delete-branch-action@v3.1.3
with:
project_id: ${{ env.NEON_PROJECT_ID }}
branch: preview/pr-${{ github.event.number }}
api_key: ${{ secrets.NEON_API_KEY }}
- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Delete Container App
run: |
az containerapp delete --yes -g RG-ethereal_realms_accelerator -n ethereal-nexus-app-$PR_NUMBER