CI: Add push latest tag on master
This commit is contained in:
@@ -6,13 +6,16 @@
|
|||||||
stages:
|
stages:
|
||||||
#- test
|
#- test
|
||||||
- build
|
- build
|
||||||
#- push_local
|
- push_local
|
||||||
- release
|
- release
|
||||||
#- push_dockerhub
|
#- push_dockerhub
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: docker:24.0.7-dind
|
image: docker:24.0.7-dind
|
||||||
stage: build
|
stage: build
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- tags
|
||||||
services:
|
services:
|
||||||
- name: docker:24.0.7-dind
|
- name: docker:24.0.7-dind
|
||||||
command: ["--tls=false"]
|
command: ["--tls=false"]
|
||||||
@@ -51,3 +54,26 @@ release:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- CHANGELOG.md
|
- CHANGELOG.md
|
||||||
|
|
||||||
|
push local:
|
||||||
|
image: docker:24.0.7-dind
|
||||||
|
stage: push_local
|
||||||
|
services:
|
||||||
|
- name: docker:24.0.7-dind
|
||||||
|
command: ["--tls=false"]
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
DOCKER_HOST: tcp://docker:2375
|
||||||
|
DOCKER_TLS_CERTDIR: ""
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
- echo $CI_COMMIT_TAG
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user