forked from dhutty/golinks
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
28 lines (27 loc) · 978 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# This file is a template, and might need editing before it works on your project.
build-master:
# Official docker image.
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --build-arg REPO="philippdrebes/golinks" --build-arg TAG="latest" --build-arg BUILD="-0.0.5" --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
build:
# Official docker image.
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --build-arg REPO="philippdrebes/golinks" --build-arg TAG="$CI_COMMIT_REF_SLUG" --build-arg BUILD="-0.0.5" --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master