Skip to content

Commit 871e152

Browse files
committed
Allow specifying build platform for lambda deploy
1 parent 8315d46 commit 871e152

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
type: string
3131
description: "The build arguments to pass to the Docker build"
3232
required: false
33+
build-platforms:
34+
type: string
35+
description: "The platforms to build the image for"
36+
required: false
3337
secrets:
3438
aws-key-id:
3539
description: "The AWS access key ID"
@@ -70,7 +74,7 @@ jobs:
7074
run: |
7175
if [[ ! -f "config.json" ]]; then echo "Error: config.json not found."; exit 1; fi
7276
73-
- name: Parse config.json
77+
- name: Read config.json
7478
id: config
7579
run: |
7680
echo 'config<<EOF' >> $GITHUB_OUTPUT
@@ -99,6 +103,7 @@ jobs:
99103
build-context: ${{ inputs.build-context }}
100104
build-target: ${{ inputs.build-target }}
101105
build-args: ${{ inputs.build-args }}
106+
build-platforms: ${{ inputs.build-platforms }}
102107
build-push: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch) }}
103108
secrets:
104109
aws-key-id: ${{ secrets.aws-key-id }}

.github/workflows/lambda_build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ on:
3939
description: "Whether to push the image to the registry"
4040
required: false
4141
default: true
42+
build-platforms:
43+
type: string
44+
description: "The platforms to build the image for"
45+
required: false
4246
secrets:
4347
aws-key-id:
4448
description: "The AWS access key ID"
@@ -114,5 +118,6 @@ jobs:
114118
labels: ${{ steps.meta.outputs.labels }}
115119
cache-from: type=gha
116120
cache-to: type=gha,mode=max,ignore-error=true
121+
platforms: ${{ inputs.build-platforms }}
117122
build-args: ${{ inputs.build-args }}
118123
secrets: ${{ secrets.build-secrets }}

0 commit comments

Comments
 (0)