prophunt-garrysmod/lgsm/hooks/pre_push
jusito f516b8df91
Feature/autobuild branch specific (#5)
docker ci will create tag depending on source branch
2020-09-27 21:32:03 +02:00

20 lines
454 B
Bash

#!/bin/sh
set -o errexit
#set -o pipefail
set -o nounset
imageSuffix=""
if [ "$SOURCE_BRANCH" != "master" ]; then
imageSuffix="-$(echo "$SOURCE_BRANCH" | sed 's/\//-/g')"
fi
#docker build -t "$DOCKER_REPO:lgsm_debian${imageSuffix}" "lgsm/"
cd ..
bash test/testBuild.sh "$imageSuffix" true
docker push "$DOCKER_REPO:gmod_debian${imageSuffix}"
docker push "$DOCKER_REPO:gmod_ttt_debian${imageSuffix}"
docker push "$DOCKER_REPO:latest${imageSuffix}"