Only do anything CI/CD with docker on the master branch

This commit is contained in:
Daniel_I_Am 2021-09-04 00:09:33 +02:00
parent aca59a2b22
commit 13ed04fc6d

View File

@ -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