push only if build succeed

This commit is contained in:
Laurent Le Houerou 2020-10-27 21:29:34 +04:00
parent a035261a3d
commit d5d957ae65

View File

@ -1,4 +1,7 @@
#!/bin/sh #!/bin/sh
docker build -t llehouerou/restic-backup . docker build -t llehouerou/restic-backup .
rc=$?
if [[ ${rc} == 0 ]]; then
docker push llehouerou/restic-backup docker push llehouerou/restic-backup
fi