Restrict the staging CI to pushes

This commit is contained in:
flow.gunso
2019-03-19 14:05:31 +01:00
parent ba457f50c6
commit d4835d5bfb

View File

@@ -16,6 +16,11 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# Just build and push as staging. # Restrict to pipeline triggered by pushes.
if [ $CI_PIPELINE_SOURCE != "push" ]; then
echo "This must be only ran from pushes."
fi
# Build and push as staging.
docker build -t $CI_REGISTRY_IMAGE:staging . docker build -t $CI_REGISTRY_IMAGE:staging .
docker push $CI_REGISTRY_IMAGE:staging docker push $CI_REGISTRY_IMAGE:staging