Skip to content

Commit

Permalink
Supported multi-platform image build (#20)
Browse files Browse the repository at this point in the history
* Added multiplatform image build
  • Loading branch information
hayk96 authored Jan 29, 2023
1 parent 5e630f6 commit bcfe84d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
container:
image: jdrouet/docker-with-buildx:stable
steps:
- uses: actions/checkout@v3

Expand All @@ -30,10 +32,8 @@ jobs:
run: |
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- name: build:alerta-web
run: docker build . --file Dockerfile --build-arg version=$IMAGE_TAG --tag ${{secrets.DOCKERHUB_USERNAME}}/$IMAGE_NAME:$IMAGE_TAG --tag ${{secrets.DOCKERHUB_USERNAME}}/$IMAGE_NAME:latest

- name: push:alerta-web
- name: buildx-&-push:alerta-web
run: |
docker push ${{secrets.DOCKERHUB_USERNAME}}/$IMAGE_NAME:$IMAGE_TAG
docker push ${{secrets.DOCKERHUB_USERNAME}}/$IMAGE_NAME:latest
docker run -d --rm --privileged tonistiigi/binfmt --install all
docker buildx create --use
docker buildx build . --push --file Dockerfile --build-arg version=$IMAGE_TAG --tag ${{secrets.DOCKERHUB_USERNAME}}/$IMAGE_NAME:$IMAGE_TAG --tag ${{secrets.DOCKERHUB_USERNAME}}/$IMAGE_NAME:latest --platform linux/arm64/v8,linux/amd64 --cache-from $IMAGE_NAME:latest

0 comments on commit bcfe84d

Please sign in to comment.