File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -7,18 +7,17 @@ git checkout master
77git pull origin master
88
99version=$( cat VERSION)
10- echo " version : $version "
10+ echo " Version : $version "
1111
12- # exit if tag already exists .
13- if [ $( git tag -l " $version " ) ]; then
14- echo " tag already exists. Ensure version number has been update in VERSION ."
12+ # check version is in the correct format .
13+ if ! [[ " $version " =~ ^v[0-9.]+$ ] ]; then
14+ echo " Version ( $ version) is in the wrong format ."
1515 exit 1
1616fi
1717
18- # check version is in the correct format.
19- if ! [[ " $version " =~ ^[0-9.]+$ ]]; then
20- echo " version: " $version " is in the wrong format."
21- exit 1
18+ if docker manifest inspect githubexporter/github-exporter:$version > /dev/null 2>&1 ; then
19+ echo " Image for version ($version ) already exists on the registry. Skipping build."
20+ exit 1
2221fi
2322
24- docker buildx build --platform linux/amd64,linux/arm64 -t githubexporter/github-exporter:$version --push .
23+ docker buildx build --platform linux/amd64,linux/arm64 -t githubexporter/github-exporter:latest -t githubexporter/github-exporter: $version --push .
You can’t perform that action at this time.
0 commit comments