From 3f03bdba7091b1245111d9a4d0cf55b8e55ec3d3 Mon Sep 17 00:00:00 2001 From: upbound-bot Date: Wed, 25 Nov 2026 09:56:53 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/wo?= =?UTF-8?q?rkflows'=20with=20remote=20'gitops/shared-files/functions/workf?= =?UTF-8?q?lows'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 21 +++++++++++++++++---- .github/workflows/e2e.yaml | 18 +++++++++++++++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17c5d60..bb4f1e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,7 @@ on: required: false env: - # Common versions - GO_VERSION: '1.26.11' + # Common versions. Go comes from each repo's go.mod (toolchain directive). GOLANGCI_VERSION: 'v2.11.4' DOCKER_BUILDX_VERSION: 'v0.23.0' @@ -45,7 +44,7 @@ jobs: - name: Setup Go uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod cache: false # The golangci-lint action does its own caching. - name: Check go mod tidy @@ -65,7 +64,7 @@ jobs: - name: Setup Go uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Run Unit Tests run: go test -v -cover ./... @@ -97,6 +96,20 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + # The image is built with the Go toolchain pinned in the repo's go.mod + # (`toolchain goX.Y.Z`), which Renovate bumps (security fixes merge + # themselves after e2e). No fallback to the `go` directive: that is only + # the minimum language version and would silently build with an old Go. + - name: Read Go toolchain from go.mod + run: | + v=$(awk '$1 == "toolchain" { sub(/^go/, "", $2); print $2 }' go.mod) + if [ -z "$v" ]; then + echo "::error file=go.mod::go.mod needs a toolchain directive (e.g. 'toolchain go1.26.11'): the function image is built with that Go version. Keep the go directive lower (the minimum language version); go mod tidy drops a toolchain line equal to it." + exit 1 + fi + echo "Building with Go $v" + echo "GO_VERSION=$v" >> "$GITHUB_ENV" + # We ask Docker to use GitHub Action's native caching support to speed up # the build, per https://docs.docker.com/build/cache/backends/gha/. - name: Build Runtime diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 7bf6ee6..21c5963 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -48,9 +48,6 @@ env: UP_ORG: ${{ secrets.UP_E2E_ORG }} UP_GROUP: ${{ secrets.UP_E2E_GROUP }} UP_ROBOT_ID: ${{ secrets.UP_E2E_ROBOT_ID }} - # Kept in lockstep with ci.yml / tag.yml and the go.mod floor (bumped manually, - # as elsewhere in these shared workflows). - GO_VERSION: '1.26.11' # Throwaway e2e artifacts (the built function + the e2e project) are pushed under # the e2e org (UP_ORG) the robot owns -- the e2e robot can't push to the # github.repository (upbound/) namespace. @@ -91,6 +88,21 @@ jobs: echo "No e2e/ harness in this repo; nothing to run." fi + # The image is built with the Go toolchain pinned in the repo's go.mod + # (`toolchain goX.Y.Z`), which Renovate bumps (security fixes merge + # themselves after e2e). No fallback to the `go` directive: that is only + # the minimum language version and would silently build with an old Go. + - name: Read Go toolchain from go.mod + if: steps.harness.outputs.present == 'true' + run: | + v=$(awk '$1 == "toolchain" { sub(/^go/, "", $2); print $2 }' go.mod) + if [ -z "$v" ]; then + echo "::error file=go.mod::go.mod needs a toolchain directive (e.g. 'toolchain go1.26.11'): the function image is built with that Go version. Keep the go directive lower (the minimum language version); go mod tidy drops a toolchain line equal to it." + exit 1 + fi + echo "Building with Go $v" + echo "GO_VERSION=$v" >> "$GITHUB_ENV" + - name: Require e2e credentials if: steps.harness.outputs.present == 'true' run: | From 1490394ceb773d20d3a4ad2ec63346b2f42f903a Mon Sep 17 00:00:00 2001 From: upbound-bot Date: Wed, 25 Nov 2026 09:56:53 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'.github/re?= =?UTF-8?q?novate.json5'=20with=20remote=20'gitops/shared-files/functions/?= =?UTF-8?q?renovate.json5'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/renovate.json5 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 93d56b6..d70556b 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -40,6 +40,9 @@ // merges it once the branch protection's required checks pass (build, lint and // unit-test, plus e2e in repos with an e2e/ harness; solutions-gitops-prod). // Every other update still waits for a human review. + // Go itself counts: the build toolchain is the `toolchain` line in go.mod (the + // shared CI and e2e workflows build with it), so a Go patch release with an + // advisory lands in this PR too. osvVulnerabilityAlerts: true, vulnerabilityAlerts: { // One PR for all open advisories in a repo. e2e runs one at a time per repo