Skip to content

Commit cb1ab96

Browse files
committed
Update environment variable to get current branch name, instead of pull request identifier, when the workflow is triggered by a PR
1 parent 1a186a2 commit cb1ab96

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎.github/workflows/R-CMD-check.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
env:
2929
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3030
R_KEEP_PKG_SOURCE: yes
31+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
3132

3233
steps:
3334
- uses: actions/checkout@v4
@@ -49,7 +50,7 @@ jobs:
4950
uses: actions/checkout@v4
5051
with:
5152
repository: ${{ github.repository_owner }}/dsBase
52-
ref: ${{ github.ref_name }}
53+
ref: ${{ env.BRANCH_NAME }}
5354
path: dsBase
5455

5556
- name: Install dsBase

0 commit comments

Comments
 (0)