From cbfbda57103630e829b0e5538731dcb8e0f164a1 Mon Sep 17 00:00:00 2001 From: "v.oleynikov" Date: Thu, 26 Mar 2026 13:30:32 +0300 Subject: [PATCH] feat(go): add go_version input for setup-go Allow workflows to override the Go version passed to actions/setup-go (default remains 1.25). --- go_linter/action.yaml | 8 +++++++- go_modules_check/action.yaml | 8 +++++++- go_test_coverage/action.yaml | 8 +++++++- go_tests/action.yaml | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/go_linter/action.yaml b/go_linter/action.yaml index 239d794..1c61585 100644 --- a/go_linter/action.yaml +++ b/go_linter/action.yaml @@ -1,6 +1,12 @@ name: "Go linter" description: "Go linter" +inputs: + go_version: + description: "Go version for actions/setup-go (e.g. 1.25.8 or 1.25.x)" + required: false + default: "1.25" + env: GO_BUILD_TAGS: "ce ee se seplus csepro" @@ -10,7 +16,7 @@ runs: - name: Setup Go environment uses: actions/setup-go@v5 with: - go-version: "1.25" + go-version: ${{ inputs.go_version }} - name: Install golangci-lint shell: bash diff --git a/go_modules_check/action.yaml b/go_modules_check/action.yaml index 2be02ac..d0e7320 100644 --- a/go_modules_check/action.yaml +++ b/go_modules_check/action.yaml @@ -1,6 +1,12 @@ name: "Go modules check" description: "Go modules version check" +inputs: + go_version: + description: "Go version for actions/setup-go (e.g. 1.25.8 or 1.25.x)" + required: false + default: "1.25" + env: GO_BUILD_TAGS: "ce ee se seplus csepro" @@ -10,7 +16,7 @@ runs: - name: Setup Go environment uses: actions/setup-go@v5 with: - go-version: "1.25" + go-version: ${{ inputs.go_version }} - name: Run Go modules version check shell: bash diff --git a/go_test_coverage/action.yaml b/go_test_coverage/action.yaml index 24f4713..65fe2a1 100644 --- a/go_test_coverage/action.yaml +++ b/go_test_coverage/action.yaml @@ -1,6 +1,12 @@ name: "Go test coverage check" description: "Go test coverage check" +inputs: + go_version: + description: "Go version for actions/setup-go (e.g. 1.25.8 or 1.25.x)" + required: false + default: "1.25" + env: GO_BUILD_TAGS: "ce ee se seplus csepro" @@ -10,7 +16,7 @@ runs: - name: Setup Go environment uses: actions/setup-go@v5 with: - go-version: "1.25" + go-version: ${{ inputs.go_version }} - name: Run Go test coverage count shell: bash diff --git a/go_tests/action.yaml b/go_tests/action.yaml index 7bd2ba4..5feae1e 100644 --- a/go_tests/action.yaml +++ b/go_tests/action.yaml @@ -1,6 +1,12 @@ name: "Go tests" description: "Go tests" +inputs: + go_version: + description: "Go version for actions/setup-go (e.g. 1.25.8 or 1.25.x)" + required: false + default: "1.25" + env: GO_BUILD_TAGS: "ce ee se seplus csepro" @@ -10,7 +16,7 @@ runs: - name: Setup Go environment uses: actions/setup-go@v5 with: - go-version: "1.25" + go-version: ${{ inputs.go_version }} - name: Run Go tests shell: bash