Skip to content

chore: upgrade github release action #696

chore: upgrade github release action

chore: upgrade github release action #696

Workflow file for this run

name: Demo link
on:
pull_request_target:
types: [opened]
jobs:
add_demo_link:
name: Add demo link to PR description
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
pull-requests: write
steps:
- name: Update PR description
uses: actions/github-script@v6
with:
script: |
const pullRequestId = context.payload.pull_request.number
const pullRequestBranch = context.payload.pull_request.head.ref
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequestId,
body: `👀 [Visit Preview](https://${pullRequestBranch}--welcome-ui.netlify.app)`
});