Skip to content

Commit 9bd49ab

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

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

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

Lines changed: 12 additions & 5 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}
@@ -95,16 +101,16 @@ jobs:
95101
echo "VERSION=$TAG_VERSION" >> $GITHUB_ENV
96102
97103
- name: Login to DockerHub
98-
uses: docker/login-action@v3
104+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.0.0
99105
with:
100106
username: ${{ secrets.DOCKERHUB_USERNAME }}
101107
password: ${{ secrets.DOCKERHUB_TOKEN }}
102108

103109
- name: Set up QEMU
104-
uses: docker/setup-qemu-action@v3
110+
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.0.0
105111

106112
- name: Set up buildx
107-
uses: docker/setup-buildx-action@v3
113+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.0.0
108114

109115
- name: Set up builder
110116
run: |
@@ -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)