-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
36 lines (31 loc) · 1007 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
image: docker:24.0
variables:
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
IMAGE_VERSION: ""
services:
- docker:dind
before_script:
- export IMAGE_VERSION=$(date +"%y%m.%j")
- |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- docker buildx create --name multiarch-builder --use
- docker buildx inspect --bootstrap
gitlab:
stage: build
script:
- cd server
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- docker buildx build --platform linux/amd64,linux/arm64 -t $CI_REGISTRY_IMAGE:latest --push .
- docker logout
only:
- main
docker hub:
stage: build
script:
- cd server
- echo -n $DOCKERHUB_ACCESS_TOKEN | docker login -u madmachinations --password-stdin
- docker buildx build --platform linux/amd64,linux/arm64 -t madmachinations/ha-alexa-shopping-list-sync:$IMAGE_VERSION -t madmachinations/ha-alexa-shopping-list-sync:latest --push .
- docker logout
only:
- main