File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff 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 }}"
You can’t perform that action at this time.
0 commit comments