Skip to content

Commit

Permalink
build: Fix the issue of missing registry and enable multi platform bu…
Browse files Browse the repository at this point in the history
…ild.
  • Loading branch information
LamGC committed Nov 27, 2024
1 parent 4ba1c29 commit e0482a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
# github.repository as <account>/<repo>
IMAGE_NAME: LamGC/poweradmin-docker
IMAGE_NAME: docker.io/LamGC/poweradmin-docker

jobs:
build:
Expand All @@ -29,6 +29,9 @@ jobs:
id: read-version
run: echo ::set-output name=version::$(cat LATEST_VERSION)

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

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
Expand All @@ -51,10 +54,11 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
uses: docker/build-push-action@v5 # v5.0.0
with:
context: .
platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6,linux/mips64le,linux/mips64
push: true
tags: ${{ env.IMAGE_NAME }}:latest, ${{ env.IMAGE_NAME }}:${{ steps.read-version.outputs.version }}
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ steps.read-version.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit e0482a9

Please sign in to comment.