Skip to content

Commit f2198ad

Browse files
authored
Make builder image arch selectable (#231)
1 parent 919a224 commit f2198ad

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

action.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
description: "Pull the latest version of builder (set to `false` for testing)"
1010
required: false
1111
default: "true"
12+
image:
13+
description: "Define the builder image archictecture (default: amd64)"
14+
required: false
15+
default: "amd64"
1216
runs:
1317
using: "composite"
1418
steps:
@@ -29,16 +33,16 @@ runs:
2933
- shell: bash
3034
if: ${{ inputs.pull == 'true' }}
3135
run: |
32-
docker pull ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }}
36+
docker pull ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }}
3337
cosign verify \
3438
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
3539
--certificate-identity-regexp https://github.com/home-assistant/builder/.* \
36-
ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }}
40+
ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }}
3741
3842
- shell: bash
3943
id: builder
4044
run: |
41-
builder=$(docker images ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} -q)
45+
builder=$(docker images ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }} -q)
4246
echo "id=$builder" >> "$GITHUB_OUTPUT"
4347
4448
- shell: bash
@@ -55,7 +59,7 @@ runs:
5559
-v ~/.docker:/root/.docker \
5660
-v ${{ github.workspace }}:/data \
5761
--env-file "${{ github.action_path }}/env_file" \
58-
ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} \
62+
ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }} \
5963
${{ inputs.args }}
6064
6165
sudo sysctl kernel.randomize_va_space=2

0 commit comments

Comments
 (0)