From d5d957ae655ccf870ceb201412f67d3e1c465fee Mon Sep 17 00:00:00 2001 From: Laurent Le Houerou Date: Tue, 27 Oct 2020 21:29:34 +0400 Subject: [PATCH] push only if build succeed --- build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4149aae..dfabfb8 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,7 @@ #!/bin/sh docker build -t llehouerou/restic-backup . -docker push llehouerou/restic-backup +rc=$? +if [[ ${rc} == 0 ]]; then + docker push llehouerou/restic-backup +fi