Skip to content

Commit

Permalink
ci: docker multi-platform using matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kunish committed Jun 13, 2023
1 parent cfefa26 commit 700f2cc
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,41 @@ name: Publish Docker Image

on:
push:
release:
types: [prereleased]
# release:
# types: [prereleased]

jobs:
publish-docker-image:
runs-on: ubuntu-latest
if: github.event_name == 'release'
# if: github.event_name == 'release'

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: docker image - quay.io
uses: aevea/action-kaniko@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

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

- name: Login to quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ github.repository_owner }}
password: ${{ secrets.QUAY_PASS }}
image: ${{ github.repository }}
build_file: Dockerfile
tag_with_latest: true
cache: true
cache_registry: quay.io/${{ github.repository_owner }}/cache

- name: Build quay.io image
uses: docker/build-push-action@v4
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: Dockerfile
platforms: linux/arm/v6,linux/arm/v7,linux/arm64,linux/amd64,linux/386
push: true
tags: |
quay.io/${{ github.repository }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 700f2cc

Please sign in to comment.