Skip to content

Commit d308fae

Browse files
committed
Refactor by review comments
1 parent 9c40d85 commit d308fae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/publish-dependency-image.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,24 @@ jobs:
7070
7171
echo "Currently on: $(git rev-parse --abbrev-ref HEAD)"
7272
echo "Commit SHA: $(git rev-parse HEAD)"
73+
echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
7374
7475
- name: Checkout submodules
76+
working-directory: presto-native-execution
7577
run: |
7678
df -h
77-
cd presto-native-execution && make submodules
78-
echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
79+
make submodules
7980
8081
- name: Extract version
8182
run: |
8283
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
8384
echo "Raw version: $VERSION"
8485
86+
if [ -z "$VERSION" ]; then
87+
echo "Failed to extract project version with Maven"
88+
exit 1
89+
fi
90+
8591
if [[ "$VERSION" == *"-SNAPSHOT" ]]; then
8692
# Remove -SNAPSHOT and append commit SHA
8793
CLEAN_VERSION=${VERSION%-SNAPSHOT}
@@ -146,6 +152,7 @@ jobs:
146152
147153
- name: Publish image
148154
run: |
155+
set -e
149156
docker tag ${{ env.LOCAL_IMAGE_TAG }} ${{ env.IMAGE_TAG }}
150157
docker push ${{ env.IMAGE_TAG }}
151158

0 commit comments

Comments
 (0)