From 13ed04fc6dbc4e0e32b8ca79913125fb7fb38960 Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Sat, 4 Sep 2021 00:09:33 +0200 Subject: [PATCH] Only do anything CI/CD with docker on the master branch --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b01b263..b20b5c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,9 @@ stages: auth-job: stage: auth image: docker:stable + only: + refs: + - master script: - docker login --username "$REGISTRY_USER" --password "$REGISTRY_PASSWORD" "$REGISTRY_BASE_URL" - cp "/root/.docker/config.json" "./build/.dockerconfigjson" @@ -17,6 +20,9 @@ auth-job: build-job: stage: build image: docker:stable + only: + refs: + - master tags: - docker script: @@ -25,6 +31,9 @@ build-job: publish-job: stage: publish image: docker:stable + only: + refs: + - master needs: - auth-job - build-job