Skip to content

Commit de7aca9

Browse files
committed
avoid snapshot from release version
Signed-off-by: Aditya Joshi <[email protected]>
1 parent a9acd14 commit de7aca9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@ jobs:
4242
password: "${{ secrets.GITHUB_TOKEN }}"
4343
- name: Generate a container image
4444
run: |
45-
version=$(mvn -q \
46-
-Dexec.executable=echo \
47-
-Dexec.args='${project.version}' \
48-
--non-recursive \
49-
exec:exec)
50-
docker build . -t ghcr.io/${USERNAME_OR_ORG}/hlf-connector:${version}
51-
docker push ghcr.io/${USERNAME_OR_ORG}/hlf-connector:${version}
45+
VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version)
46+
IMAGE_TAG=$(echo "$VERSION" | sed 's/-SNAPSHOT$//')
47+
docker build . -t ghcr.io/${USERNAME_OR_ORG}/hlf-connector:${IMAGE_TAG}
48+
docker push ghcr.io/${USERNAME_OR_ORG}/hlf-connector:${IMAGE_TAG}
5249
shell: bash
5350
env:
5451
USERNAME_OR_ORG: "${{ github.repository_owner }}"

0 commit comments

Comments
 (0)