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: |