Skip to content

Commit e9e9582

Browse files
committed
Post review app URL to PR comments
1 parent 4899735 commit e9e9582

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.github/workflows/cicd-1-pull-request-closed.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
name: Delete review app pr-${{ github.event.pull_request.number }}
1111
permissions:
1212
id-token: write
13+
pull-requests: write
1314
runs-on: ubuntu-latest
1415
environment: review
1516
concurrency: deploy-review-${{ github.ref }}
@@ -36,3 +37,10 @@ jobs:
3637
--output tsv --query id)
3738
3839
scripts/bash/wait_ado_pipeline.sh "$RUN_ID" https://dev.azure.com/nhse-dtos dtos-manage-breast-screening
40+
41+
- name: Post URL to PR comments
42+
uses: marocchino/sticky-pull-request-comment@8ac02941f254c53fbda0cf44288785e1367e13bf
43+
with:
44+
message: |
45+
The review app at this URL has been deleted:
46+
https://pr-${{ github.event.pull_request.number }}.manage-breast-screening.non-live.screening.nhs.uk

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,18 @@ jobs:
8484
commit_sha: ${{ github.event.pull_request.head.sha }}
8585
pr_number: ${{ github.event.pull_request.number }}
8686
secrets: inherit
87+
post-url:
88+
if: contains(github.event.pull_request.labels.*.name, 'deploy')
89+
name: Post URL pr-${{ github.event.pull_request.number }} to PR comments
90+
runs-on: ubuntu-latest
91+
needs: [deploy-stage]
92+
permissions:
93+
pull-requests: write
94+
steps:
95+
- name: Post URL to PR comments
96+
uses: marocchino/sticky-pull-request-comment@8ac02941f254c53fbda0cf44288785e1367e13bf
97+
with:
98+
message: |
99+
The review app is available at this URL:
100+
https://pr-${{ github.event.pull_request.number }}.manage-breast-screening.non-live.screening.nhs.uk
101+
You must authenticate with Entra ID

0 commit comments

Comments
 (0)