Build only master and tags

This commit is contained in:
Patrick Jentsch 2019-06-04 11:59:55 +02:00
parent cc838300cf
commit 2d65189d96

View File

@ -17,7 +17,7 @@ Build:
tags: tags:
- docker - docker
Push master: Push latest:
image: docker:latest image: docker:latest
only: only:
- master - master
@ -31,10 +31,10 @@ Push master:
tags: tags:
- docker - docker
Push others: Push tag:
except:
- master
image: docker:latest image: docker:latest
only:
- tags
script: script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME