Skip to content

Commit

Permalink
try GITHUB_REF instead of GITHUB_SHA
Browse files Browse the repository at this point in the history
  • Loading branch information
sjd78 committed Jul 20, 2022
1 parent 6e0d10e commit 86ce3f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .automation/build-srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ done
make validations

# git hash of current commit from GH action or from the HEAD commit
if [[ "${GITHUB_SHA}" == "" ]]; then
if [[ "${GITHUB_REF}" == "" ]]; then
GIT_HASH=$(git rev-parse --short HEAD)
else
GIT_HASH=$(git rev-parse --short $GITHUB_SHA)
GIT_HASH=$(git rev-parse --short $GITHUB_REF)
fi

# Prepare the SNAPSHOT release suffix if a MILESTONE is available
Expand Down

0 comments on commit 86ce3f2

Please sign in to comment.