Skip to content

Commit c54555e

Browse files
committed
Fixes
1 parent cf790d2 commit c54555e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/actions/cmake/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ runs:
6060
# GitHub creates merge commits for PRS, so we:
6161
# - explicitly provide branch name
6262
# - provide `github.event.pull_request.head.sha` to get the actual commit SHA of the PR branch.
63-
GITHUB_REF_NAME: "${{ github.ref_name }}"
63+
GITHUB_BRANCH_NAME: "${{ github.event.pull_request.head.ref || github.ref_name }}"
6464
GITHUB_HEAD_SHA: "${{ github.event.pull_request.head.sha || github.sha }}"
6565
run: |
6666
cmake \

cmake/ClioVersion.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ else ()
2727
if (DEFINED ENV{GITHUB_REF_NAME})
2828
# Please, see cmake action in .github/actions/ for details
2929
set(BRANCH $ENV{GITHUB_REF_NAME})
30-
set(REV $ENV{GITHUB_HEAD_SHA})
30+
set(GITHUB_HEAD_SHA $ENV{GITHUB_HEAD_SHA})
31+
string(SUBSTRING ${GITHUB_HEAD_SHA} 0 7 REV)
3132
else ()
3233
set(GIT_COMMAND branch --show-current)
3334
execute_process(

0 commit comments

Comments
 (0)