-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
47 lines (43 loc) · 977 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
41
42
43
44
45
46
47
image: registry.alebastr.su/alebastr/qmk-whitefox-keymap
stages:
- pre-build
- build
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_DRIVER: overlay2
GIT_SUBMODULE_STRATEGY: none
build:
stage: build
tags:
- docker:linux
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
# Cache external submodules to speed-up build
- .git/modules/
- vendor/qmk_firmware/
script:
- git -C vendor/qmk_firmware reset --hard
- git submodule update --init --recursive
- make
artifacts:
name: "$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA"
paths:
- 'whitefox-*.bin'
build-docker:
stage: pre-build
image: docker:stable
services:
- docker:dind
tags:
- docker:linux
only:
changes:
- docker/*
refs:
- master
script:
- cd docker
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest