Fixed ci yaml sytax error

This commit is contained in:
Solomon Laing 2021-06-06 02:14:57 +00:00
parent ca1dbafb9f
commit 6664f307be

View File

@ -1,8 +1,5 @@
image: docker:20.10.5
tags:
- docker
stages:
- build
- push
@ -12,6 +9,8 @@ before_script:
build:
stage: build
tags:
- docker
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
@ -20,6 +19,8 @@ build:
# Tag the "master" branch as "latest"
push latest:
stage: push
tags:
- docker
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
@ -30,6 +31,8 @@ push latest:
# Docker tag any Git tag
push tag:
stage: push
tags:
- docker
only:
- tags
script: