Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-arch docker build to the GitHub actions workflow #198

Merged
merged 1 commit into from
Aug 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add multiarch docker build to the github actions workflow
Signed-off-by: Krasi Georgiev <[email protected]>
  • Loading branch information
krasi-georgiev committed Aug 18, 2021
commit 7e5b814ea139bd5a72f2b04795548236656e7d8c
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ jobs:
run: |
aws s3 sync dist/upload s3://builds.loraserver.io/chirpstack-gateway-bridge

# Runs on pull request to ensure the docker build works,
# but pushes only on commits to master and on PRs.
docker:
needs: test
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
-
name: Checkout
Expand All @@ -57,7 +58,7 @@ jobs:
uses: docker/metadata-action@v3
with:
images: |
chirpstack/chirpstack-gateway-bridge
chirpstack/${{ github.event.repository.name }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}
Expand All @@ -70,6 +71,7 @@ jobs:
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -79,8 +81,8 @@ jobs:
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
Expand Down