Skip to content

Commit

Permalink
fix(docker): infer BUILD_VERSION from environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Sep 10, 2024
1 parent b79455f commit 6770b9c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker_main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
env:
OWNER: ${{ secrets.DOCKERHUB_USERNAME }}
VERSION: ${{ github.ref_name }}
BUILD_VERSION: ${{ github.ref_name }}
run: |
(cd docker && ./build-release-images.sh $VERSION)
2 changes: 1 addition & 1 deletion docker/build-dev-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILD_OPTS="--pull --progress=plain"

TAG="$OWNER/$TARGET:${VER}"

BUILD_VERSION=$(git describe --tags)
BUILD_VERSION=${BUILD_VERSION:=$(git describe --tags)}

# Note that we are invoking `docker build` from our parent directory
# with -f pointing towards our custom Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion docker/build-release-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MAJMIN=$(echo $VER | grep -Eo '[0-9]+\.[0-9]+')
# Optionally tag docker image with major.minor if $VER matches SemVer spec
[[ ! -z "$MAJMIN" ]] && TAG_MAJMIN="-t $OWNER/$TARGET:$MAJMIN"

BUILD_VERSION=$(git describe --tags)
BUILD_VERSION=${BUILD_VERSION:=$(git describe --tags)}

# Note that we are invoking `docker build` from our parent directory
# with -f pointing towards our custom Dockerfile
Expand Down

0 comments on commit 6770b9c

Please sign in to comment.