File tree Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Expand file tree Collapse file tree 3 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 6
6
build :
7
7
runs-on : ubuntu-latest
8
8
steps :
9
- - uses : actions/checkout@v4
10
- - name : Build & Test
11
- run : docker build -t domnikl/schema-registry-gitops .
9
+ - name : Check out the repo
10
+ uses : actions/checkout@v4
11
+ - name : Set up QEMU
12
+ uses : docker/setup-qemu-action@v3
13
+ - name : Set up Docker Buildx
14
+ uses : docker/setup-buildx-action@v3
15
+ - name : Validate build configuration
16
+ uses : docker/build-push-action@v6
17
+ with :
18
+ call : check
19
+ - name : Build
20
+ uses : docker/build-push-action@v6
21
+ with :
22
+ context : .
23
+ push : false
24
+ tags : domnikl/schema-registry-gitops
25
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change @@ -11,23 +11,29 @@ jobs:
11
11
steps :
12
12
- name : Check out the repo
13
13
uses : actions/checkout@v4
14
-
15
14
- name : Log in to the container registry
16
15
uses : docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
17
16
with :
18
17
username : ${{ secrets.DOCKER_USERNAME }}
19
18
password : ${{ secrets.DOCKER_PASSWORD }}
20
-
21
19
- name : Extract metadata (tags, labels) for Docker
22
20
id : meta
23
21
uses : docker/metadata-action@8e1d5461f02b7886d3c1a774bfbd873650445aa2
24
22
with :
25
23
images : domnikl/schema-registry-gitops
26
-
27
- - name : Build and push Docker image
28
- uses : docker/build-push-action@31ca4e5d51253d7e4a2317bfe74699cbe3a398a9
24
+ - name : Set up QEMU
25
+ uses : docker/setup-qemu-action@v3
26
+ - name : Set up Docker Buildx
27
+ uses : docker/setup-buildx-action@v3
28
+ - name : Validate build configuration
29
+ uses : docker/build-push-action@v6
30
+ with :
31
+ call : check
32
+ - name : Build
33
+ uses : docker/build-push-action@v6
29
34
with :
30
35
context : .
31
36
push : true
32
37
tags : ${{ steps.meta.outputs.tags }}
33
38
labels : ${{ steps.meta.outputs.labels }}
39
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ FROM amazoncorretto:17.0.13-alpine AS tester
2
2
3
3
WORKDIR /home/cuser
4
4
5
- ADD ./gradle /home/cuser/gradle
6
- ADD ./gradlew ./gradle.properties ./build.gradle.kts ./settings.gradle.kts ./.editorconfig /home/cuser/
5
+ COPY ./gradle /home/cuser/gradle
6
+ COPY ./gradlew ./gradle.properties ./build.gradle.kts ./settings.gradle.kts ./.editorconfig /home/cuser/
7
7
RUN ./gradlew --no-daemon build
8
- ADD ./src /home/cuser/src
8
+ COPY ./src /home/cuser/src
9
9
RUN ./gradlew --no-daemon check
10
10
11
11
FROM tester AS builder
You can’t perform that action at this time.
0 commit comments