forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
28 lines (23 loc) · 935 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.
# Official docker image.
image: jdrouet/docker-with-buildx:stable
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker buildx create --use
stages:
- build-dep
- build
build-dep:
stage: build-dep
script:
- docker buildx build --push --platform linux/arm64/v8 --target build-dep -t "$CI_REGISTRY_IMAGE:build-dep" --cache-from "type=registry,ref=$CI_REGISTRY_IMAGE:build-dep-cache" --cache-to "type=registry,ref=$CI_REGISTRY_IMAGE:build-dep-cache,mode=max" .
only:
- master
build:
stage: build
script:
- docker buildx build --push --platform linux/arm64/v8 --target release -t "$CI_REGISTRY_IMAGE" --cache-from "type=registry,ref=$CI_REGISTRY_IMAGE:cache" --cache-to "type=registry,ref=$CI_REGISTRY_IMAGE:cache,mode=max" .
only:
- master