Skip to content

Commit

Permalink
In case of push split the GITHUB_REF to use only the part after the l…
Browse files Browse the repository at this point in the history
…ast slash
  • Loading branch information
ptormene committed Oct 28, 2024
1 parent 978d30f commit 0bdd086
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/demos_ltr_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ jobs:
python install.py devel --version ${GITHUB_HD_REF}
elif ${{ github.event_name == 'push' }}
then
echo "It is a push; use the corresponding branch: ${GITHUB_REF}"
python install.py devel --version ${GITHUB_REF}
BRANCH=${GITHUB_REF##*\/}
echo "It is a push; use the corresponding branch: ${BRANCH}"
python install.py devel --version ${BRANCH}
else
echo "It was triggered manually; use the selected Git Ref: $GITHUB_INPUT_REF "
python install.py devel --version ${GITHUB_INPUT_REF}
Expand Down Expand Up @@ -76,8 +77,9 @@ jobs:
GITHUB_BR=${GITHUB_HD_REF}
elif ${{ github.event_name == 'push' }}
then
echo "It is a push; use the corresponding branch: ${GITHUB_REF}"
GITHUB_BR=${GITHUB_REF}
BRANCH=${GITHUB_REF##*\/}
echo "It is a push; use the corresponding branch: ${BRANCH}"
GITHUB_BR=${BRANCH}
else
echo "It was triggered manually; use the selected Git Ref: $GITHUB_INPUT_REF "
GITHUB_BR=${GITHUB_INPUT_REF}
Expand Down

0 comments on commit 0bdd086

Please sign in to comment.