Skip to content

Commit

Permalink
Simplify tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusklocke committed Apr 30, 2024
1 parent 702b2a0 commit 655c5fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ fi
MARIADB_IMAGE="mariadb:${MARIADB_VERSION}"
REDIS_IMAGE="redis:${REDIS_VERSION}-alpine"

if [[ $GITHUB_REF == *"refs/tags"* ]]; then
TAG=${GITHUB_REF##refs/tags/}
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
TAG="${GITHUB_REF_NAME}"
else
TAG="latest"
fi
Expand Down Expand Up @@ -59,8 +59,8 @@ echo "Building image ${TARGET_IMAGE} ..."
DOCKER_BUILDKIT=1 docker build \
-f docker/php/${TARGET_TYPE}/Dockerfile \
-t ${TARGET_IMAGE} \
--build-arg PHP_VERSION=$PHP_VERSION \
--build-arg APP_VERSION=$TAG \
--build-arg "PHP_VERSION=$PHP_VERSION" \
--build-arg "APP_VERSION=$TAG" \
--cache-from ${TARGET_IMAGE} . \
--pull

Expand Down

0 comments on commit 655c5fe

Please sign in to comment.