-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
40 lines (36 loc) · 828 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
29
30
31
32
33
34
35
36
37
38
39
40
stages:
- lint
- build
- release
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
MAIN_IMAGE_TAG: $CI_REGISTRY_IMAGE:main
RELEASE_IMAGE_TAG: $CI_REGISTRY_IMAGE:release
lint:
image: node:18
stage: lint
script:
- yarn --frozen-lockfile
- yarn locales:compile
- yarn lint
build:
image: docker.io/docker:stable
stage: build
tags:
- medium
script:
- DOCKER_IMAGE_TAGS="$MAIN_IMAGE_TAG" ./scripts/docker-build-push.sh
only:
- main
release:
image: docker.io/docker:stable
stage: release
tags:
- medium
script:
- pwd
- env DOCKER_IMAGE_TAGS="$RELEASE_IMAGE_TAG $CI_REGISTRY_IMAGE:$(./scripts/get-package-version.sh)" ./scripts/docker-build-push.sh
only:
- /^v\d+\.\d+\.\d+$/ # use `yarn version` to create these tags
except:
- branches