Skip to content

Commit

Permalink
add image tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
catchcatchus authored and random1223 committed Sep 8, 2024
1 parent 6fef24f commit 50759b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions image/publish_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DOCKER_BUILD_VERSION=$1
BUILD_JAR=$2
DOCKER_IMG=codetyio/codety


if [ "$BUILD_JAR" != "0" ]; then
echo " ========= Build application start ========":
java --version
Expand All @@ -17,6 +18,9 @@ fi

echo " ========= Build application end ========":

git tag -a "$DOCKER_BUILD_VERSION" -m "tag version $DOCKER_BUILD_VERSION"
git push origin "$DOCKER_BUILD_VERSION"

#--platform=linux/amd64,linux/arm64
echo " ========= Build and publish images start ========":
docker buildx build --platform=linux/amd64 -t "$DOCKER_IMG":$DOCKER_BUILD_VERSION -t "$DOCKER_IMG":latest -f image/Dockerfile . --push
Expand Down

0 comments on commit 50759b2

Please sign in to comment.