Add linux/arm64 docker image build support (#774)

This commit is contained in:
KwongTN
2024-08-30 02:50:38 +08:00
committed by GitHub
parent 7cbc9178d8
commit 81933b918d

View File

@@ -23,14 +23,17 @@ jobs:
steps: steps:
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Determine tags - name: Determine tags
id: metadata id: metadata
uses: docker/metadata-action@v4 uses: docker/metadata-action@v5
with: with:
images: ${{ env.registry }}/${{ env.image-name }} images: ${{ env.registry }}/${{ env.image-name }}
tags: | tags: |
@@ -42,15 +45,18 @@ jobs:
type=raw,value=latest,enable={{ is_default_branch }} type=raw,value=latest,enable={{ is_default_branch }}
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@v2.1.0 uses: docker/login-action@v3
with: with:
registry: ${{ env.registry }} registry: ${{ env.registry }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push ${{ env.image-name }} - name: Build and push ${{ env.image-name }}
uses: docker/build-push-action@v3 uses: docker/build-push-action@v6
with: with:
context: .
platforms: linux/amd64,linux/arm64
provenance: false
push: true push: true
tags: ${{ steps.metadata.outputs.tags }} tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }} labels: ${{ steps.metadata.outputs.labels }}