Skip to content

Commit 0663255

Browse files
Add Docker builds for arm/v6, arm/v7 and arm64. (#198)
Signed-off-by: Krasi Georgiev <[email protected]>
1 parent 9975ada commit 0663255

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ jobs:
4343
run: |
4444
aws s3 sync dist/upload s3://builds.loraserver.io/chirpstack-gateway-bridge
4545
46+
# Runs on pull request to ensure the docker build works,
47+
# but pushes only on commits to master and on PRs.
4648
docker:
4749
needs: test
4850
runs-on: ubuntu-latest
49-
if: startsWith(github.ref, 'refs/tags/v')
5051
steps:
5152
-
5253
name: Checkout
@@ -57,7 +58,7 @@ jobs:
5758
uses: docker/metadata-action@v3
5859
with:
5960
images: |
60-
chirpstack/chirpstack-gateway-bridge
61+
chirpstack/${{ github.event.repository.name }}
6162
tags: |
6263
type=semver,pattern={{version}}
6364
type=semver,pattern={{major}}
@@ -70,6 +71,7 @@ jobs:
7071
uses: docker/setup-buildx-action@v1
7172
-
7273
name: Login to DockerHub
74+
if: startsWith(github.ref, 'refs/tags/v')
7375
uses: docker/login-action@v1
7476
with:
7577
username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -79,8 +81,8 @@ jobs:
7981
id: docker_build
8082
uses: docker/build-push-action@v2
8183
with:
82-
context: .
83-
push: true
84+
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
85+
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
8486
tags: ${{ steps.meta.outputs.tags }}
8587
labels: ${{ steps.meta.outputs.labels }}
8688
-

0 commit comments

Comments
 (0)