Skip to content

Commit a7ef96d

Browse files
authored
ci/qg-253: исправлена сборка образа из ветки по кнопке
1 parent 773e7aa commit a7ef96d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/build-docker-image.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ jobs:
2929

3030
steps:
3131

32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v4
33+
with:
34+
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
35+
fetch-depth: 0
3336

3437
- name: Set up JDK 21
3538
uses: actions/setup-java@v4
@@ -65,7 +68,7 @@ jobs:
6568
fi
6669
# normalize to short branch/tag name
6770
REF_NAME="${REF##*/}"
68-
SHORT_SHA="${GITHUB_SHA::7}"
71+
SHORT_SHA=$(git rev-parse --short HEAD)
6972
if [ -n '${{ inputs.image_tag }}' ]; then
7073
TAG='${{ inputs.image_tag }}'
7174
else

0 commit comments

Comments
 (0)