Is there a way to get and set the Github’s pull request number (example PR #323 ) into Github Actions’s Environment Variable (without the hashtag)?
env:
GITHUB_PR_NUMBER: 323
Is there a way to get and set the Github’s pull request number (example PR #323 ) into Github Actions’s Environment Variable (without the hashtag)?
env:
GITHUB_PR_NUMBER: 323
on:
pull_request
env:
GITHUB_PR_NUMBER: ${{github.event.pull_request.number}}
jobs:
prJob:
name: Print event
runs-on: ubuntu-latest
steps:
- run: |
echo "$GITHUB_PR_NUMBER"
For more information, see https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request