Skip to content

Commit 45d6c1b

Browse files
authored
🔧(action) publish a comment when label preview is added (#1467)
The label preview will deploy a full environment. This environment is accessible using a specific url. This commit will publish a comment with the good url.
1 parent dc25f3f commit 45d6c1b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Label Preview
2+
3+
on:
4+
pull_request:
5+
types: [labeled, opened]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
comment:
12+
runs-on: ubuntu-latest
13+
if: contains(github.event.pull_request.labels.*.name, 'preview')
14+
steps:
15+
- uses: thollander/actions-comment-pull-request@v3
16+
with:
17+
message: |
18+
:rocket: Preview will be available at [https://${{ github.event.pull_request.number }}-docs.ppr-docs.beta.numerique.gouv.fr/](https://${{ github.event.pull_request.number }}-docs.ppr-docs.beta.numerique.gouv.fr/)
19+
20+
You can use the existing account with these credentials:
21+
- username: `docs`
22+
- password: `docs`
23+
24+
You can also create a new account if you want to.
25+
26+
Once this Pull Request is merged, the preview will be destroyed.
27+
comment-tag: preview-url

0 commit comments

Comments
 (0)