binder-examples / continuous-build

Show how to use continuous integration to test your dependency specifications
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

[suggestion] tag of "latest" pushed with commit tag ? #14

Open vsoch opened 6 years ago

vsoch commented 6 years ago

If we just include the first 10 characters of the commit, this will push containers that are well versioned! However (as a lazy) user, I sometimes really do just want the latest, whatever it may be :) How about, as a suggestion, at the end also tagging the image for latest, and pushing with the tagged? E.g., it would look like this:

            echo "Container name set to ${CONTAINER_NAME}:${DOCKER_TAG}"
            if [[ -n "$DOCKER_PASS" ]]; then
                  docker login -u $DOCKER_USER -p $DOCKER_PASS
                  docker push ${CONTAINER_NAME}:${DOCKER_TAG}
                  echo "Tagging latest image..."
                  docker tag ${CONTAINER_NAME}:${DOCKER_TAG} ${CONTAINER_NAME}:latest
                  docker push ${CONTAINER_NAME}:latest
            fi