Skip to content

Commit

Permalink
YETUS-1182. ghcr builds for tags don't work (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
aw-was-here committed May 23, 2022
1 parent 0fa36c6 commit 2e29d3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,14 @@ fi

if [[ -z "${SOURCE_BRANCH}" ]]; then
SOURCE_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
if [[ "${SOURCE_BRANCH}" == 'HEAD' ]]; then
SOURCE_BRANCH=$(git describe --tags)
fi
export SOURCE_BRANCH
fi

SOURCE_BRANCH=${SOURCE_BRANCH/rel\//}

if [[ -z "${DOCKER_TAG}" ]]; then
DOCKER_TAG=${SOURCE_BRANCH}
export DOCKER_TAG
Expand Down Expand Up @@ -123,6 +128,10 @@ if [[ "${BUILDERINSTANCE}" =~ docker-container ]]; then
PLATARRAY=(--platform "${PLATSTRING}")
fi

echo
echo "Building ${DOCKER_REPO}-base:${DOCKER_TAG}"
echo

opencontainerslabels "base"

# Build the -base image
Expand Down

0 comments on commit 2e29d3d

Please sign in to comment.