File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -120,13 +120,18 @@ jobs:
120120 command : |
121121 echo ${DOCKER_PASSWORD}| docker login -u ${DOCKER_USER} --password-stdin
122122 if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$"; then
123+ git pull --tags
124+
123125 VERSION=$(git tag | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$" | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -1)
124126
125- docker tag bundle "jancajthaml/datadog_mock:${VERSION}"
127+ echo "releasing version ${VERSION} and updating latest"
128+
126129 docker tag bundle "jancajthaml/datadog_mock:latest"
127- docker push "jancajthaml/datadog_mock:${VERSION}"
128130 docker push "jancajthaml/datadog_mock:latest"
129131
132+ docker tag bundle "jancajthaml/datadog_mock:${VERSION}"
133+ docker push "jancajthaml/datadog_mock:${VERSION}"
134+
130135 else
131136 parse_git_branch() {
132137 branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null)
@@ -137,6 +142,8 @@ jobs:
137142 }
138143 VERSION="$(parse_git_branch)"
139144
145+ echo "releasing snapshot ${VERSION}"
146+
140147 docker tag bundle "jancajthaml/datadog_mock:${VERSION}"
141148 docker push "jancajthaml/datadog_mock:${VERSION}"
142149 fi
You can’t perform that action at this time.
0 commit comments