Skip to content

Commit

Permalink
build arm image
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Paulic committed Sep 20, 2024
1 parent 0f30592 commit 0144279
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/reusable-workflow-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
docker-dir:
required: true
type: string
platform:
required: true
type: string

jobs:
docker-build:
Expand All @@ -32,14 +35,14 @@ jobs:
password: ${{ secrets.ACR_PASSWORD }}

- name: Set up Docker Buildx
with:
platform: linux/amd64,linux/arm64
uses: docker/setup-buildx-action@v3

- name: Build Docker Image
with:
PLATFORM: ${{ input.platform }}
run: |
echo "Building image: $REGISTRY/$IMAGE_NAME:$IMAGE_TAG"
docker build --platform linux/amd64 -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $DOCKER_DIR
docker build --platform $PLATFORM -t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG $DOCKER_DIR
- name: Push Docker image
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ jobs:
with:
image-name: marko-test
docker-dir: user
platform: arm64 #amd64
secrets: inherit

0 comments on commit 0144279

Please sign in to comment.