File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,18 @@ jobs:
4646 build :
4747 name : Build ${{ matrix.arch }} plugin
4848 needs : init
49- runs-on : ubuntu-latest
49+ runs-on : ${{ matrix.runs-on }}
5050 permissions :
5151 contents : read
5252 packages : write
5353 id-token : write
5454 strategy :
5555 matrix :
5656 arch : ${{ fromJson(needs.init.outputs.architectures) }}
57+ include :
58+ - runs-on : ubuntu-24.04
59+ - arch : aarch64
60+ runs-on : ubuntu-24.04-arm
5761 steps :
5862 - name : Checkout the repository
5963 uses : actions/checkout@v6.0.2
7377 - name : Build plugin
7478 uses : home-assistant/builder@2025.11.0
7579 with :
80+ image : ${{ matrix.arch }}
7681 args : |
7782 $BUILD_ARGS \
7883 --${{ matrix.arch }} \
Original file line number Diff line number Diff line change 11ARG BUILD_FROM
22
3- FROM --platform=amd64 golang:1.24-alpine3.22 AS builder
3+ FROM golang:1.24-alpine3.22 AS builder
44
55WORKDIR /workspace/observer-plugin
66ARG BUILD_ARCH
@@ -9,14 +9,8 @@ COPY . .
99
1010# Build
1111RUN \
12- if [ "${BUILD_ARCH}" = "armhf" ]; then \
13- CGO_ENABLED=0 GOARM=6 GOARCH=arm go build -ldflags="-s -w" ; \
14- elif [ "${BUILD_ARCH}" = "armv7" ]; then \
15- CGO_ENABLED=0 GOARM=7 GOARCH=arm go build -ldflags="-s -w" ; \
16- elif [ "${BUILD_ARCH}" = "aarch64" ]; then \
12+ if [ "${BUILD_ARCH}" = "aarch64" ]; then \
1713 CGO_ENABLED=0 GOARCH=arm64 go build -ldflags="-s -w" ; \
18- elif [ "${BUILD_ARCH}" = "i386" ]; then \
19- CGO_ENABLED=0 GOARCH=386 go build -ldflags="-s -w" ; \
2014 elif [ "${BUILD_ARCH}" = "amd64" ]; then \
2115 CGO_ENABLED=0 GOARCH=amd64 go build -ldflags="-s -w" ; \
2216 else \
You can’t perform that action at this time.
0 commit comments