github.com/aergoio/aergo@v1.3.1/hooks/post_push (about)

     1  #!/bin/bash
     2  
     3  BUILD_TAG=$(echo $SOURCE_BRANCH | sed -e 's/^v//')
     4  if [[ "$BUILD_TAG" =~ ^([0-9]+).([0-9]+).([0-9]+)$ ]]; then
     5  	MAJOR_TAG=$(echo "$BUILD_TAG" | sed -e 's/\.[0-9]*$//')
     6  	docker tag  $DOCKER_REPO:$BUILD_TAG $DOCKER_REPO:$MAJOR_TAG
     7  	docker push $DOCKER_REPO:$MAJOR_TAG
     8  	docker tag  $DOCKER_REPO:$BUILD_TAG $DOCKER_REPO:latest
     9  	docker push $DOCKER_REPO:latest
    10  fi
    11