Only do anything CI/CD with docker on the master branch
This commit is contained in:
parent
aca59a2b22
commit
13ed04fc6d
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user