From c3d02d68b79d6e98ece36aeab7c5119942a5571f Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Tue, 27 Jun 2023 09:29:45 +0200 Subject: [PATCH] Fix Cosign Image build (#95328) --- .github/workflows/builder.yml | 4 ++++ machine/generic-x86-64 | 7 +++++-- machine/intel-nuc | 7 +++++-- machine/khadas-vim3 | 7 +++++-- machine/odroid-c2 | 7 +++++-- machine/odroid-c4 | 7 +++++-- machine/odroid-m1 | 7 +++++-- machine/odroid-n2 | 7 +++++-- machine/odroid-xu | 7 +++++-- machine/qemuarm | 7 +++++-- machine/qemuarm-64 | 7 +++++-- machine/qemux86 | 7 +++++-- machine/qemux86-64 | 7 +++++-- machine/raspberrypi | 7 +++++-- machine/raspberrypi2 | 7 +++++-- machine/raspberrypi3 | 7 +++++-- machine/raspberrypi3-64 | 7 +++++-- machine/raspberrypi4 | 7 +++++-- machine/raspberrypi4-64 | 7 +++++-- machine/tinker | 7 +++++-- machine/yellow | 7 +++++-- 21 files changed, 104 insertions(+), 40 deletions(-) diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 965b7d912d9..01c3136aecb 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -324,6 +324,10 @@ jobs: if: github.repository_owner == 'home-assistant' needs: ["init", "build_base"] runs-on: ubuntu-latest + permissions: + contents: read + packages: write + id-token: write steps: - name: Checkout the repository uses: actions/checkout@v3.5.3 diff --git a/machine/generic-x86-64 b/machine/generic-x86-64 index bbd72e93d51..389809c6d8e 100644 --- a/machine/generic-x86-64 +++ b/machine/generic-x86-64 @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/amd64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ libva-intel-driver diff --git a/machine/intel-nuc b/machine/intel-nuc index 9b8a2b3eef9..ebf174105c4 100644 --- a/machine/intel-nuc +++ b/machine/intel-nuc @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/amd64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION # NOTE: intel-nuc will be replaced by generic-x86-64. Make sure to apply # changes in generic-x86-64 as well. diff --git a/machine/khadas-vim3 b/machine/khadas-vim3 index af934f31f0e..3194c092d54 100644 --- a/machine/khadas-vim3 +++ b/machine/khadas-vim3 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/odroid-c2 b/machine/odroid-c2 index af934f31f0e..3194c092d54 100644 --- a/machine/odroid-c2 +++ b/machine/odroid-c2 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/odroid-c4 b/machine/odroid-c4 index af934f31f0e..3194c092d54 100644 --- a/machine/odroid-c4 +++ b/machine/odroid-c4 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/odroid-m1 b/machine/odroid-m1 index af934f31f0e..3194c092d54 100644 --- a/machine/odroid-m1 +++ b/machine/odroid-m1 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/odroid-n2 b/machine/odroid-n2 index af934f31f0e..3194c092d54 100644 --- a/machine/odroid-n2 +++ b/machine/odroid-n2 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/odroid-xu b/machine/odroid-xu index 57f6d0cddb8..3194c092d54 100644 --- a/machine/odroid-xu +++ b/machine/odroid-xu @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/armv7-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/qemuarm b/machine/qemuarm index 54fc002097a..3194c092d54 100644 --- a/machine/qemuarm +++ b/machine/qemuarm @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/armhf-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/qemuarm-64 b/machine/qemuarm-64 index af934f31f0e..3194c092d54 100644 --- a/machine/qemuarm-64 +++ b/machine/qemuarm-64 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/qemux86 b/machine/qemux86 index 23264cb6b18..3194c092d54 100644 --- a/machine/qemux86 +++ b/machine/qemux86 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/i386-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/qemux86-64 b/machine/qemux86-64 index 3e7a43d1335..3194c092d54 100644 --- a/machine/qemux86-64 +++ b/machine/qemux86-64 @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/amd64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/raspberrypi b/machine/raspberrypi index 876fcfce21e..d3b88f9a8ff 100644 --- a/machine/raspberrypi +++ b/machine/raspberrypi @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/armhf-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \ diff --git a/machine/raspberrypi2 b/machine/raspberrypi2 index 5d109e240b7..3da2d3c6a43 100644 --- a/machine/raspberrypi2 +++ b/machine/raspberrypi2 @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/armv7-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \ diff --git a/machine/raspberrypi3 b/machine/raspberrypi3 index 5d109e240b7..3da2d3c6a43 100644 --- a/machine/raspberrypi3 +++ b/machine/raspberrypi3 @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/armv7-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \ diff --git a/machine/raspberrypi3-64 b/machine/raspberrypi3-64 index 9205b90389a..3da2d3c6a43 100644 --- a/machine/raspberrypi3-64 +++ b/machine/raspberrypi3-64 @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \ diff --git a/machine/raspberrypi4 b/machine/raspberrypi4 index 5d109e240b7..3da2d3c6a43 100644 --- a/machine/raspberrypi4 +++ b/machine/raspberrypi4 @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/armv7-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \ diff --git a/machine/raspberrypi4-64 b/machine/raspberrypi4-64 index 9205b90389a..3da2d3c6a43 100644 --- a/machine/raspberrypi4-64 +++ b/machine/raspberrypi4-64 @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \ diff --git a/machine/tinker b/machine/tinker index 57f6d0cddb8..3194c092d54 100644 --- a/machine/tinker +++ b/machine/tinker @@ -1,2 +1,5 @@ -ARG BUILD_VERSION -FROM homeassistant/armv7-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION diff --git a/machine/yellow b/machine/yellow index 9205b90389a..3da2d3c6a43 100644 --- a/machine/yellow +++ b/machine/yellow @@ -1,5 +1,8 @@ -ARG BUILD_VERSION -FROM homeassistant/aarch64-homeassistant:$BUILD_VERSION +ARG \ + BUILD_FROM \ + BUILD_VERSION + +FROM $BUILD_FROM:$BUILD_VERSION RUN apk --no-cache add \ raspberrypi \