Skip to content

Commit

Permalink
Make builder image arch selectable (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
mib1185 authored Feb 25, 2025
1 parent 919a224 commit f2198ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: "Pull the latest version of builder (set to `false` for testing)"
required: false
default: "true"
image:
description: "Define the builder image archictecture (default: amd64)"
required: false
default: "amd64"
runs:
using: "composite"
steps:
Expand All @@ -29,16 +33,16 @@ runs:
- shell: bash
if: ${{ inputs.pull == 'true' }}
run: |
docker pull ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }}
docker pull ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }}
cosign verify \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp https://github.com/home-assistant/builder/.* \
ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }}
ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }}
- shell: bash
id: builder
run: |
builder=$(docker images ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} -q)
builder=$(docker images ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }} -q)
echo "id=$builder" >> "$GITHUB_OUTPUT"
- shell: bash
Expand All @@ -55,7 +59,7 @@ runs:
-v ~/.docker:/root/.docker \
-v ${{ github.workspace }}:/data \
--env-file "${{ github.action_path }}/env_file" \
ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} \
ghcr.io/home-assistant/${{ inputs.image }}-builder:${{ steps.version.outputs.version }} \
${{ inputs.args }}
sudo sysctl kernel.randomize_va_space=2
Expand Down

0 comments on commit f2198ad

Please sign in to comment.