Skip to content

Commit

Permalink
build: manual docker image build platform selection (#722)
Browse files Browse the repository at this point in the history
* build: allow choice of docker image architecture to use

* build: fix platform selection for docker build
  • Loading branch information
lklimek authored Dec 22, 2023
1 parent 548add8 commit 975c120
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
type: string
description: "Docker tag"
required: false

platforms:
type: choice
description: "Image architecture to build"
default: "linux/amd64,linux/arm64"
options:
- "linux/amd64,linux/arm64"
- "linux/amd64"
- "linux/arm64"
release:
types:
- published
Expand Down Expand Up @@ -79,7 +88,7 @@ jobs:
with:
context: .
file: ./DOCKER/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: ${{ github.event.inputs.platforms }}
target: base
push: false
cache-from: |
Expand All @@ -95,7 +104,7 @@ jobs:
with:
context: .
file: ./DOCKER/Dockerfile
platforms: linux/amd64,linux/arm64
platforms: ${{ github.event.inputs.platforms }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
Expand Down

0 comments on commit 975c120

Please sign in to comment.