Skip to content

Commit 4b0bbbe

Browse files
committed
Test build multiplatform image
1 parent 8b2001c commit 4b0bbbe

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

.github/workflows/build-and-push-image.yaml

+26-19
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,42 @@ jobs:
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 60
1616
steps:
17-
- name: Login to Docker Hub
18-
uses: docker/login-action@v2
19-
with:
20-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
21-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
22-
2317
- name: Checkout
24-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
2519
- name: Setup Java
2620
uses: actions/setup-java@v2
2721
with:
2822
distribution: 'temurin'
2923
java-version: '17'
3024
cache: 'maven'
3125

32-
- name: Validate source code formatting
33-
run: |
34-
make lint
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v3
28+
with:
29+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
30+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
3531

36-
- name: Make package
37-
run: |
38-
make package
32+
# Add support for more platforms with QEMU
33+
# https://github.com/docker/setup-qemu-action
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
3936

40-
- name: Build docker image
41-
run: |
42-
make build-image
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v3
39+
# https://github.com/docker/setup-buildx-action
40+
with:
41+
platforms: linux/amd64,linux/arm64
42+
# Sets up docker build command as an alias to docker buildx
43+
install: true
4344

44-
- name: Push docker image
45-
run: |
46-
make push-image
45+
- name: Package
46+
run: make package
4747

48+
- name: Build and push
49+
uses: docker/build-push-action@v6
50+
with:
51+
platforms: linux/amd64,linux/arm64
52+
push: true
53+
context: ./src/artifacts/api
54+
tags: geoservercloud/geoserver-acl:latest
4855

0 commit comments

Comments
 (0)