From 6f2e1242afef245cc8a07a08f06c43ca4b0cdd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20K=C3=BCc=C3=BCk?= Date: Tue, 25 Jun 2024 01:14:23 +0200 Subject: [PATCH] Add preview env URL to PRs (#4273) --- .github/workflows/comment-preview-url.yml | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/comment-preview-url.yml diff --git a/.github/workflows/comment-preview-url.yml b/.github/workflows/comment-preview-url.yml new file mode 100644 index 000000000..ca49eb1e5 --- /dev/null +++ b/.github/workflows/comment-preview-url.yml @@ -0,0 +1,28 @@ +name: Add preview environment URL to PR + +on: + pull_request: + types: [labeled] + +permissions: + pull-requests: write + +env: + PR_NUMBER: ${{ github.event.number }} + +jobs: + comment: + if: ${{ contains(github.event.pull_request.labels.*.name, 'preview') }} + runs-on: ubuntu-latest + steps: + - name: Comment with preview URL + uses: thollander/actions-comment-pull-request@v2.5.0 + with: + message: | +
+ + |Preview environment👷🏼‍♀️🏗️ | + |:-:| + | [PR-${{env.PR_NUMBER}}](https://pr-${{env.PR_NUMBER}}.review.plausible.io) + +