Skip to content

Commit

Permalink
Build arm64 docker image (#16363)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Sep 20, 2021
1 parent ff6f358 commit adff6bb
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/docker-image-publish-github-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@
name: Publish Docker Image

on:
workflow_dispatch:
push:
branches: [main]
branches:
- main
# Publish semver tags as releases.
tags: ['v*.*.*']
pull_request:
branches: [main]
tags:
- 'v*.*.*'

jobs:
build:
Expand All @@ -38,12 +39,20 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2.3.4

- name: Set up QEMU
uses: docker/setup-qemu-action@v1.2.0
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v1.10.0
with:
registry: ghcr.io
username: ${{ github.actor }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker metadata
Expand All @@ -56,6 +65,7 @@ jobs:
uses: docker/build-push-action@v2.7.0
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit adff6bb

Please sign in to comment.