From buildlog it looks like the commit sha is also accessible from GITHUB_SHA. Lets try this, for making it more easy.

This commit is contained in:
Lars Gohr
2019-08-22 07:23:55 +02:00
parent 3730249596
commit e541342d5d
2 changed files with 6 additions and 4 deletions

View File

@@ -21,8 +21,7 @@ fi
if [ "${INPUT_SNAPSHOT}" == "true" ]; then
SHA=$(env | grep ^github\\.sha= | cut -d= -f2-) # Thank you Github for using dots in variables
SHA_DOCKER_NAME="${DOCKER_REPOSITORY}:${SHA}"
SHA_DOCKER_NAME="${DOCKER_REPOSITORY}:${GITHUB_SHA}"
docker build $CUSTOMDOCKERFILE -t ${DOCKERNAME} -t ${SHA_DOCKER_NAME} .
docker push ${DOCKERNAME}
docker push ${SHA_DOCKER_NAME}