Skip to content

Commit

Permalink
include git branch as build arg
Browse files Browse the repository at this point in the history
  • Loading branch information
travisghansen committed Jan 31, 2021
1 parent d75548c commit 6255206
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/bin/docker-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ if [[ -n "${GIT_TAG}" ]]; then
docker buildx build --build-arg "GIT_TAG=${GIT_TAG}" --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${GIT_TAG} .
elif [[ -n "${GIT_BRANCH}" ]]; then
if [[ "${GIT_BRANCH}" == "master" ]]; then
docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:latest .
docker buildx build --build-arg "GIT_TAG=${GIT_BRANCH}" --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:latest .
else
docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${GIT_BRANCH} .
docker buildx build --build-arg "GIT_TAG=${GIT_BRANCH}" --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${GIT_BRANCH} .
fi
else
:
Expand Down

0 comments on commit 6255206

Please sign in to comment.