Skip to content

PPHA-671: Add question to change text in hidden span #63

PPHA-671: Add question to change text in hidden span

PPHA-671: Add question to change text in hidden span #63

name: Delete review app
on:
pull_request:
types: [closed]
jobs:
destroy:
if: contains(github.event.pull_request.labels.*.name, 'deploy')
name: Delete review app pr-${{ github.event.pull_request.number }}
permissions:
id-token: write
pull-requests: write
runs-on: ubuntu-latest
environment: review
# Prevent concurrent jobs on the same environment and between deploy and delete workflows
concurrency: deploy-review-${{ github.event.pull_request.number }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: azure/login@v3
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Call delete review app pipeline
run: |
echo "Starting Azure devops pipeline \"Delete review app\"..."
RUN_ID=$(az pipelines run \
--commit-id ${{ github.event.pull_request.head.sha }}\
--name "Delete review app"\
--org https://dev.azure.com/nhse-dtos \
--project lung-cancer-screening \
--parameters commitSHA=${{ github.event.pull_request.head.sha }} prNumber=${{ github.event.pull_request.number }} \
--output tsv --query id)
echo "See pipeline run in Azure devops: https://dev.azure.com/nhse-dtos/lung-cancer-screening/_build/results?buildId=${RUN_ID}&view=results"
scripts/bash/wait_ado_pipeline.sh "$RUN_ID" https://dev.azure.com/nhse-dtos lung-cancer-screening
- name: Post URL to PR comments
uses: marocchino/sticky-pull-request-comment@5a61de79c6a3f3f961d6e3ceea2efe7b4cd01f32
with:
message: |
The review app at this URL has been deleted:
https://pr-${{ github.event.pull_request.number }}.non-live.digital-lung-cancer-screening.nhs.uk