From d5770f265180be1e49f07d871abd89dc75a69799 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 8 Aug 2024 15:33:17 +0200 Subject: [PATCH 1/2] Use released versions of the builder To build or test the builder, let's use a released version of the builder. This allows to fix the builder in case something got broken with a PR. --- .github/workflows/publish.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5ed8020..6453a7c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,7 +52,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Publish ${{ matrix.architecture }} builder - uses: ./ + uses: home-assistant/builder@2024.03.5 with: args: | --${{ matrix.architecture }} \ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dcdcce..5d815bb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: uses: actions/checkout@v4 - name: Build the builder - uses: home-assistant/builder@master + uses: home-assistant/builder@2024.03.5 with: args: | --test \ From 0d1ce128e20c002d97a1ed6bfe6775a07af0bb94 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 12 Aug 2024 14:47:42 +0200 Subject: [PATCH 2/2] Do not pull the latest version of builder when testing When testing, pulling the latest version makes the whole test kinda pointless, as the last version currently published gets tested instead of the just built one. Add a new argument so we can still reuse the same builder action, but skip pulling to reuse the freshly built builder. --- .github/workflows/test.yml | 1 + action.yml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d815bb..3963451 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,3 +46,4 @@ jobs: --${{ matrix.architecture }} \ --target /data \ --generic ${{ github.sha }} + no-pull: true diff --git a/action.yml b/action.yml index 7b257ee..c39a99a 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,10 @@ inputs: description: "Arguments passed to the builder" required: true default: "--help" + no-pull: + description: "Do not pull the latest version of builder (for testing)" + required: false + default: false runs: using: "composite" steps: @@ -23,6 +27,7 @@ runs: echo "version=${input}" >> "$GITHUB_OUTPUT" - shell: bash + if: ${{ inputs.no-pull == true }} run: | docker pull ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} cosign verify \