-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
69 lines (62 loc) · 1.37 KB
/
.gitlab-ci.yml
File metadata and controls
69 lines (62 loc) · 1.37 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
stages:
- prepare
- build
- docker
image: node:latest
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
before_script:
- corepack enable
- corepack prepare pnpm@latest --activate
- pnpm install --frozen-lockfile
eslint:
stage: prepare
cache:
paths:
- node_modules/
policy: pull
script:
- pnpm lint
artifacts:
reports:
codequality: gl-codequality.json
build:
stage: build
cache:
paths:
- node_modules/
policy: pull
dependencies:
- eslint
script:
- pnpm build
build-and-push-web-image:
stage: docker
image: docker:24.0.5
services:
- docker:24.0.5-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- echo "${GHCR_PAT}" | docker login ghcr.io -u "${GHCR_USR}" --password-stdin
script:
- docker build -t ghcr.io/${GHCR_USR}/bmhk2025-web:latest -f apps/web/Dockerfile .
- docker push ghcr.io/${GHCR_USR}/bmhk2025-web:latest
only:
- main
build-and-push-api-image:
stage: docker
image: docker:24.0.5
services:
- docker:24.0.5-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
before_script:
- echo "${GHCR_PAT}" | docker login ghcr.io -u "${GHCR_USR}" --password-stdin
script:
- docker build -t ghcr.io/${GHCR_USR}/bmhk2025-api:latest -f apps/api/Dockerfile .
- docker push ghcr.io/${GHCR_USR}/bmhk2025-api:latest
only:
- main