Files
Publish-Docker-Github-Action/entrypoint.sh
2019-02-24 20:38:26 +01:00

14 lines
259 B
Bash
Executable File

#!/bin/sh -l
DOCKER_REPOSITORY=$*
BRANCH=$(echo ${GITHUB_REF} | sed -e "s/refs\/heads\///g")
if [ "${BRANCH}" = "master" ]; then
BRANCH="latest"
fi;
DOCKERNAME="${DOCKER_REPOSITORY}:${BRANCH}"
docker build -t ${DOCKERNAME} .
docker push ${DOCKERNAME}