Skip to content

Commit 0114ddb

Browse files
authored
Merge pull request #21 from paulorb/multiarch
fix(ISSUE-20): Add support for docker multiarch
2 parents fbde40e + cc9e49f commit 0114ddb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- master
7+
- refs/tags/*
78
pull_request:
89
branches:
910
- master
@@ -49,3 +50,27 @@ jobs:
4950
with:
5051
name: build-artifacts
5152
path: build/libs/*.jar
53+
54+
docker:
55+
runs-on: ubuntu-latest
56+
if: github.event.action == 'push' && github.event.ref_type == 'tag'
57+
steps:
58+
-
59+
name: Login to Docker Hub
60+
uses: docker/login-action@v3
61+
with:
62+
username: ${{ vars.DOCKERHUB_USERNAME }}
63+
password: ${{ secrets.DOCKERHUB_TOKEN }}
64+
-
65+
name: Set up QEMU
66+
uses: docker/setup-qemu-action@v3
67+
-
68+
name: Set up Docker Buildx
69+
uses: docker/setup-buildx-action@v3
70+
-
71+
name: Build and push
72+
uses: docker/build-push-action@v6
73+
with:
74+
platforms: linux/amd64,linux/arm64
75+
push: true
76+
tags: paulorb/modbus-simulator-cli:latest,paulorb/modbus-simulator-cli:${{ github.ref_name }}

0 commit comments

Comments
 (0)