Skip to content

Commit

Permalink
Docker build and publish at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-alvarez-alvarez committed May 9, 2024
1 parent 4a41a1b commit 94866a6
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@ function do_build() {
--label org.opencontainers.image.created="$BUILD_DATE" \
--label org.opencontainers.image.source=https://github.com/DataDog/dd-asm-samples \
--label org.opencontainers.image.revision="$GIT_HEAD_REF" \
--push \
--tag "$IMAGE_NAME:latest" \
./docker
}

function do_push() {
docker push "$IMAGE_NAME:latest"
}

if [[ -z ${1:-} ]]; then
do_build
elif [[ ${1} = "--push" ]]; then
do_push
fi
do_build

0 comments on commit 94866a6

Please sign in to comment.