analytics/.github/workflows/comment-preview-url.yml
2024-06-25 01:14:23 +02:00

29 lines
653 B
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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: |
<div align="center">
|Preview environment👷🏼🏗 |
|:-:|
| [PR-${{env.PR_NUMBER}}](https://pr-${{env.PR_NUMBER}}.review.plausible.io)
</div>