Skip to content

Commit 2fd8215

Browse files
author
Dominik Liebler
authored
Merge pull request #421 from matray/main
Multi-arch image support
2 parents 6dd8966 + db19210 commit 2fd8215

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
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

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,29 @@ jobs:
1111
steps:
1212
- name: Check out the repo
1313
uses: actions/checkout@v4
14-
1514
- name: Log in to the container registry
1615
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
1716
with:
1817
username: ${{ secrets.DOCKER_USERNAME }}
1918
password: ${{ secrets.DOCKER_PASSWORD }}
20-
2119
- name: Extract metadata (tags, labels) for Docker
2220
id: meta
2321
uses: docker/metadata-action@8e1d5461f02b7886d3c1a774bfbd873650445aa2
2422
with:
2523
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
2934
with:
3035
context: .
3136
push: true
3237
tags: ${{ steps.meta.outputs.tags }}
3338
labels: ${{ steps.meta.outputs.labels }}
39+
platforms: linux/amd64,linux/arm64

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ FROM amazoncorretto:17.0.13-alpine AS tester
22

33
WORKDIR /home/cuser
44

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/
77
RUN ./gradlew --no-daemon build
8-
ADD ./src /home/cuser/src
8+
COPY ./src /home/cuser/src
99
RUN ./gradlew --no-daemon check
1010

1111
FROM tester AS builder

0 commit comments

Comments
 (0)