Skip to content

Commit

Permalink
Support multiple platforms docker image build (#65)
Browse files Browse the repository at this point in the history
* ci: build multiple platforms

* ci: enable GitHub action for pull request

* chore: update workflow

- add manual dispatch trigger
- push image when not in pull request
  • Loading branch information
imfing committed May 9, 2023
1 parent 3658ac5 commit 8b75b80
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build-publish-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Create and publish a Docker image

on:
workflow_dispatch:
pull_request:
push:
tags:
- 'v*'
Expand All @@ -20,6 +22,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
Expand All @@ -37,6 +45,7 @@ jobs:
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8b75b80

Please sign in to comment.