Skip to content

Commit

Permalink
fix gh-57 multiarch build
Browse files Browse the repository at this point in the history
  • Loading branch information
hollanbm committed Jan 6, 2024
1 parent dcf41e0 commit 4ea30f4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build_and_publish_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Remove "_Docker" suffix from GitHub repository name to use it as image name
uses: mad9000/actions-find-and-replace-string@3
Expand All @@ -24,33 +24,37 @@ jobs:

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ steps.docker_image_name.outputs.value }}
ghcr.io/${{ steps.docker_image_name.outputs.value }}
tags: type=raw,value=latest

- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

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

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

- name: Build and publish Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit 4ea30f4

Please sign in to comment.