From fe24f0cdc5c88e29ea74d57201915d3bf882e90b Mon Sep 17 00:00:00 2001 From: violet Date: Thu, 11 Jul 2024 13:42:58 -0400 Subject: [PATCH] Parameterize go version in our builds This is so sad --- .github/actions/build-gaiad-binary/action.yml | 9 ++++++--- .github/workflows/gaiad-linux-release.yml | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-gaiad-binary/action.yml b/.github/actions/build-gaiad-binary/action.yml index a79a5e4..e36eea3 100644 --- a/.github/actions/build-gaiad-binary/action.yml +++ b/.github/actions/build-gaiad-binary/action.yml @@ -18,6 +18,9 @@ inputs: bot_token: description: "The GitHub token for the bot." required: true + go_version: + description: "The go version to download and use." + required: true runs: using: "composite" steps: @@ -35,8 +38,8 @@ runs: - name: Install golang shell: bash run: | - wget -q https://go.dev/dl/go1.22.4.linux-amd64.tar.gz - sudo tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz + wget -q https://go.dev/dl/go${{ inputs.go_version }}.linux-amd64.tar.gz + sudo tar -C /usr/local -xzf go${{ inputs.go_version }}.linux-amd64.tar.gz - name: Update PATH shell: bash @@ -48,7 +51,7 @@ runs: shell: bash run: | go version - export GOTOOLCHAIN=go1.22.4 + export GOTOOLCHAIN=go${{ inputs.go_version }} git clone https://github.com/cosmos/gaia.git cd gaia git checkout ${{ inputs.ref }} diff --git a/.github/workflows/gaiad-linux-release.yml b/.github/workflows/gaiad-linux-release.yml index 8c76a64..d894bb6 100644 --- a/.github/workflows/gaiad-linux-release.yml +++ b/.github/workflows/gaiad-linux-release.yml @@ -6,6 +6,9 @@ on: version_regex: description: "The regex to filter the version (e.g. '^v18')" required: true + go_version: + description: "The go version to download and use." + default: "1.22.4" # push: jobs: @@ -43,6 +46,7 @@ jobs: remote_commit_sha: ${{ matrix.release }} github_token: ${{ secrets.GITHUB_TOKEN }} bot_token: ${{ secrets.HYPHA_BOT_ACTIONS_TOKEN }} + go_version: ${{ github.event.inputs.go_version }} build-docker: name: Build Docker image runs-on: ubuntu-latest @@ -68,5 +72,5 @@ jobs: git-ref: ${{ matrix.release }} github-organization: cosmos github-repo: gaia - additional-args: "--go-version=1.22.3" + additional-args: "--go-version=${{ inputs.go_version }}" heighliner-tag: v1.5.5