mirror of
https://github.com/elgohr/Publish-Docker-Github-Action.git
synced 2026-03-12 18:07:12 -04:00
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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user