From db2dfb556d2e4f1de1f46751fd19fdff6565cefe Mon Sep 17 00:00:00 2001 From: Nicolas Clerc Date: Fri, 12 Jun 2026 17:34:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(action)=20publish=20a=20comment=20?= =?UTF-8?q?when=20label=20preview=20is=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/label_preview.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/label_preview.yml diff --git a/.github/workflows/label_preview.yml b/.github/workflows/label_preview.yml new file mode 100644 index 00000000..568fbd25 --- /dev/null +++ b/.github/workflows/label_preview.yml @@ -0,0 +1,27 @@ +name: Label Preview + +on: + pull_request: + types: [labeled, opened] + +permissions: + pull-requests: write + +jobs: + comment: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'preview') + steps: + - uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3 + with: + message: | + :rocket: Preview will be available at [https://${{ github.event.pull_request.number }}-drive.ppr-fichiers.beta.numerique.gouv.fr/](https://${{ github.event.pull_request.number }}-drive.ppr-fichiers.beta.numerique.gouv.fr/) + + You can use the existing account with these credentials: + - username: `drive` + - password: `drive` + + You can also create a new account if you want to. + + Once this Pull Request is merged, the preview will be destroyed. + comment-tag: preview-url