From 91d1fbf3c527f6d97fd15d2dd6b1eb0e269e3193 Mon Sep 17 00:00:00 2001 From: Michael Zalimeni Date: Mon, 17 Jun 2024 14:30:56 -0400 Subject: [PATCH] ci: add missing ref argument for get-go-version Supports nightly tests. --- .../workflows/nightly-test-integ-peering_commontopo.yml | 2 ++ .github/workflows/nightly-test-integrations-1.15.x.yml | 3 +++ .github/workflows/nightly-test-integrations-1.17.x.yml | 3 +++ .github/workflows/nightly-test-integrations-1.18.x.yml | 2 ++ .github/workflows/nightly-test-integrations-1.19.x.yml | 2 ++ .github/workflows/reusable-get-go-version.yml | 9 +++++++++ 6 files changed, 21 insertions(+) diff --git a/.github/workflows/nightly-test-integ-peering_commontopo.yml b/.github/workflows/nightly-test-integ-peering_commontopo.yml index e38cae0bd97a..5c7f5fa23bab 100644 --- a/.github/workflows/nightly-test-integ-peering_commontopo.yml +++ b/.github/workflows/nightly-test-integ-peering_commontopo.yml @@ -39,6 +39,8 @@ jobs: get-go-version: uses: ./.github/workflows/reusable-get-go-version.yml + with: + ref: ${{ inputs.branch }} get-envoy-versions: uses: ./.github/workflows/reusable-get-envoy-versions.yml diff --git a/.github/workflows/nightly-test-integrations-1.15.x.yml b/.github/workflows/nightly-test-integrations-1.15.x.yml index 66545a4fe891..8ac92f282f34 100644 --- a/.github/workflows/nightly-test-integrations-1.15.x.yml +++ b/.github/workflows/nightly-test-integrations-1.15.x.yml @@ -50,8 +50,11 @@ jobs: get-go-version: needs: [check-ent] uses: ./.github/workflows/reusable-get-go-version.yml + with: + ref: release/1.15.x get-envoy-versions: + needs: [check-ent] uses: ./.github/workflows/reusable-get-envoy-versions.yml with: ref: release/1.15.x diff --git a/.github/workflows/nightly-test-integrations-1.17.x.yml b/.github/workflows/nightly-test-integrations-1.17.x.yml index 8c220f6e8335..df952d8234fa 100644 --- a/.github/workflows/nightly-test-integrations-1.17.x.yml +++ b/.github/workflows/nightly-test-integrations-1.17.x.yml @@ -50,8 +50,11 @@ jobs: get-go-version: needs: [check-ent] uses: ./.github/workflows/reusable-get-go-version.yml + with: + ref: release/1.17.x get-envoy-versions: + needs: [check-ent] uses: ./.github/workflows/reusable-get-envoy-versions.yml with: ref: release/1.17.x diff --git a/.github/workflows/nightly-test-integrations-1.18.x.yml b/.github/workflows/nightly-test-integrations-1.18.x.yml index 7be0abe0935c..2c4470b13c56 100644 --- a/.github/workflows/nightly-test-integrations-1.18.x.yml +++ b/.github/workflows/nightly-test-integrations-1.18.x.yml @@ -42,6 +42,8 @@ jobs: get-go-version: uses: ./.github/workflows/reusable-get-go-version.yml + with: + ref: release/1.18.x get-envoy-versions: uses: ./.github/workflows/reusable-get-envoy-versions.yml diff --git a/.github/workflows/nightly-test-integrations-1.19.x.yml b/.github/workflows/nightly-test-integrations-1.19.x.yml index 00950d8f3b61..452d174e1eca 100644 --- a/.github/workflows/nightly-test-integrations-1.19.x.yml +++ b/.github/workflows/nightly-test-integrations-1.19.x.yml @@ -42,6 +42,8 @@ jobs: get-go-version: uses: ./.github/workflows/reusable-get-go-version.yml + with: + ref: release/1.19.x get-envoy-versions: uses: ./.github/workflows/reusable-get-envoy-versions.yml diff --git a/.github/workflows/reusable-get-go-version.yml b/.github/workflows/reusable-get-go-version.yml index 2fac43b9dac3..91e870c73cc6 100644 --- a/.github/workflows/reusable-get-go-version.yml +++ b/.github/workflows/reusable-get-go-version.yml @@ -2,6 +2,12 @@ name: get-go-version on: workflow_call: + inputs: + ref: + description: | + The Consul ref/branch (e.g. release/1.18.x) for which to determine the Go version. + If not provided, the default actions/checkout value (current ref) is used. + type: string outputs: go-version: description: "The Go version detected by this workflow" @@ -19,6 +25,9 @@ jobs: go-version-previous: ${{ steps.get-go-version.outputs.go-version-previous }} steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 + with: + # If not set, will default to current branch. + ref: ${{ inputs.ref }} - name: Determine Go version id: get-go-version # We use .go-version as our source of truth for current Go