Skip to content

Commit 8e5fa14

Browse files
authored
Merge pull request #186 from karelmaxa/arm-build
Use native platform for docker build phase
2 parents 9d8a50f + 8a4ca5c commit 8e5fa14

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ jobs:
1010
java: [11, 17]
1111
name: "Java ${{ matrix.java }} build"
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
- name: Set up JDK
15-
uses: actions/setup-java@v1
15+
uses: actions/setup-java@v3
1616
with:
1717
java-version: ${{ matrix.java }}
18+
distribution: 'temurin'
1819
- name: Cache Maven packages
1920
uses: actions/cache@v4
2021
with:

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout repository
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Set up Docker buildx
1616
id: buildx
17-
uses: docker/setup-buildx-action@v2
17+
uses: docker/setup-buildx-action@v3
1818

1919
- name: Cache Docker layers
2020
uses: actions/cache@v3
@@ -26,18 +26,18 @@ jobs:
2626
2727
- name: Extract metadata
2828
id: meta
29-
uses: docker/metadata-action@v4
29+
uses: docker/metadata-action@v5
3030
with:
3131
images: wrensecurity/wrenam
3232

3333
- name: Login to Docker Hub
34-
uses: docker/login-action@v2
34+
uses: docker/login-action@v3
3535
with:
3636
username: ${{ secrets.DOCKERHUB_USERNAME }}
3737
password: ${{ secrets.DOCKERHUB_TOKEN }}
3838

3939
- name: Build and push
40-
uses: docker/build-push-action@v3
40+
uses: docker/build-push-action@v5
4141
with:
4242
context: .
4343
builder: ${{ steps.buildx.outputs.name }}
@@ -46,7 +46,7 @@ jobs:
4646
push: true
4747
tags: ${{ steps.meta.outputs.tags }}
4848
labels: ${{ steps.meta.outputs.labels }}
49-
platforms: linux/amd64
49+
platforms: linux/amd64,linux/arm64
5050
cache-from: type=local,src=/tmp/.buildx-cache
5151
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
5252

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:bullseye-slim AS project-build
1+
FROM --platform=$BUILDPLATFORM debian:bullseye-slim AS project-build
22

33
# Install build dependencies
44
RUN \
@@ -16,11 +16,11 @@ WORKDIR /project
1616
COPY . .
1717

1818
# Perform actual Wren:AM build
19-
ARG BUILD_ARGS
19+
ARG MAVEN_BUILD_ARGS
2020
RUN \
2121
--mount=type=cache,target=/root/.m2 \
2222
--mount=type=cache,target=/root/.npm \
23-
mvn package ${BUILD_ARGS}
23+
mvn package ${MAVEN_BUILD_ARGS}
2424

2525
# Copy built artifacts into target directory
2626
RUN \

0 commit comments

Comments
 (0)