Skip to content

Commit 05d39f0

Browse files
authored
Includes GITHUB_PR_REF_NAME as a job-level environment variable. (#799)
* Includes GITHUB_PR_REF_NAME as a job-level environment variable. * Remove env definition from the step level.
1 parent 65373d7 commit 05d39f0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/preview-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref || github.ref }}
5151
cancel-in-progress: ${{ startsWith(github.event_name, 'pull_request') }}
5252
runs-on: ubuntu-latest
53+
env:
54+
GITHUB_PR_REF_NAME: ${{ github.event.pull_request.head.ref }}
5355
steps:
5456

5557
- name: Checkout
@@ -115,7 +117,6 @@ jobs:
115117
env:
116118
PR_NUMBER: ${{ github.event.pull_request.number }}
117119
GITHUB_REF_NAME: ${{ github.ref_name }}
118-
GITHUB_PR_REF_NAME: ${{ github.event.pull_request.head.ref }}
119120
run: |
120121
case "${GITHUB_EVENT_NAME}" in
121122
"merge_group" | "pull_request" | "pull_request_target")

0 commit comments

Comments
 (0)