From fda2e6109df22de51d5a262762b518c1ce0ace7e Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 10 Mar 2026 22:33:32 +0100 Subject: [PATCH 1/4] Add cache to building hub image in CI Signed-off-by: Guillaume Tardif --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa0e8af7d..b9f257dfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,5 +142,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - GIT_TAG=${{ github.ref_name }} - GIT_COMMIT=${{ github.sha }} + GIT_TAG=${{ github.event_name == 'pull_request' && 'pr' || github.ref_name }} + GIT_COMMIT=${{ github.event_name == 'pull_request' && 'dev' || github.sha }} + cache-from: type=gha,scope=buildx + cache-to: type=gha,mode=max,scope=buildx From 78153c153e44f96ec48c0747876ee9d7bf630d7e Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 10 Mar 2026 22:47:01 +0100 Subject: [PATCH 2/4] build and test go on the same runner, don't compile everything twice Signed-off-by: Guillaume Tardif --- .github/workflows/ci.yml | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9f257dfc..cb7f00fab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: fail-on-error: true pyflakes: false - test: + build-and-test: runs-on: ubuntu-latest steps: - name: Checkout @@ -56,6 +56,12 @@ jobs: with: version: 3.x + - name: Create bin directory + run: mkdir -p "$HOME/bin" + + - name: Build + run: task build + - name: Run tests run: | task test @@ -79,32 +85,8 @@ jobs: - name: Check licenses run: go-licenses check . --allowed_licenses=Apache-2.0,MIT,BSD-3-Clause,BSD-2-Clause --ignore modernc.org/mathutil - build: - needs: [lint, test, license-check] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - - name: Set up Go - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 - with: - go-version: "1.26.0" - cache: true - - - name: Install Task - uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0 - with: - version: 3.x - - - name: Create bin directory - run: mkdir -p "$HOME/bin" - - - name: Build - run: task build - build-image: - needs: [lint, test, license-check] + needs: [lint, build-and-test, license-check] runs-on: ubuntu-latest steps: - name: Checkout From 07bbc467abdc0c4f70bf96dad9d21148df40e236 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 10 Mar 2026 23:11:05 +0100 Subject: [PATCH 3/4] test go change Signed-off-by: Guillaume Tardif --- cmd/root/root.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/root/root.go b/cmd/root/root.go index b75a07a64..9336f15c0 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -75,7 +75,6 @@ We collect anonymous usage data to help improve docker agent. To disable: ` fmt.Fprint(cmd.ErrOrStderr(), telemetryMsg) } - fmt.Fprintln(cmd.ErrOrStderr()) } From b4018747713e22e1461786b982d24286f775a383 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 10 Mar 2026 23:27:01 +0100 Subject: [PATCH 4/4] Revert "test go change" This reverts commit 07bbc467abdc0c4f70bf96dad9d21148df40e236. --- cmd/root/root.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/root/root.go b/cmd/root/root.go index 9336f15c0..b75a07a64 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -75,6 +75,7 @@ We collect anonymous usage data to help improve docker agent. To disable: ` fmt.Fprint(cmd.ErrOrStderr(), telemetryMsg) } + fmt.Fprintln(cmd.ErrOrStderr()) }