We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db6dee8 commit c485a84Copy full SHA for c485a84
publish-docker.sh
@@ -16,8 +16,11 @@ docker build . -t mevdschee/php-crud-api:latest
16
# Revert
17
git switch -
18
19
-# Press enter to publish
20
-echo -n Press enter to publish..; read
+# Confirm to publish
+read -p "Publish $latestTag to mevdschee/php-crud-api:$dockerTag? " -n 1 -r
21
+echo # (optional) move to a new line
22
+if [[ $REPLY =~ ^[Yy]$ ]]
23
+then
24
25
# Login to DockerHub
26
docker login
@@ -26,3 +29,4 @@ docker push mevdschee/php-crud-api:$dockerTag
29
# Push latest
27
30
docker push mevdschee/php-crud-api:latest
28
31
32
+fi
0 commit comments