diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index 0c1428a3a..175cb78b5 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -1,14 +1,18 @@ -# A resuable workflow that's used to setup the go enviroment and cache. -name: Setup go enviroment +name: "Setup Golang environment" +description: "A reusable workflow that's used to set up the Go environment and cache." +inputs: + go-version: + description: "The version of Golang to set up" + required: true runs: using: "composite" steps: - - name: setup go ${{ env.GO_VERSION }} + - name: setup go ${{ inputs.go-version }} uses: actions/setup-go@v3 with: - go-version: '${{ env.GO_VERSION }}' + go-version: '${{ inputs.go-version }}' - name: go cache uses: actions/cache@v3 @@ -23,9 +27,9 @@ runs: ~/.cache/go-build ~/Library/Caches/go-build ~\AppData\Local\go-build - key: ${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-go-${{ inputs.go-version }}-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go-${{ env.GO_VERSION }}- + ${{ runner.os }}-go-${{ inputs.go-version }}- - name: set GOPATH shell: bash diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da8806135..a53e06071 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,9 +39,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: run check run: make rpc-check @@ -68,9 +69,10 @@ jobs: with: fetch-depth: 0 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: fetch and rebase on ${{ github.base_ref }} run: | @@ -95,9 +97,10 @@ jobs: with: fetch-depth: 0 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: check code format run: make fmt-check @@ -115,9 +118,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: build release for all architectures run: make release @@ -132,9 +136,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: check all command line flags exist in sample-lnd.conf file run: make sample-conf-check @@ -158,9 +163,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: install bitcoind run: ./scripts/install_bitcoind.sh @@ -204,9 +210,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: install bitcoind run: ./scripts/install_bitcoind.sh @@ -237,9 +244,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: run itest run: make itest-parallel windows=1 tranches=2 parallel=2 @@ -285,9 +293,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: install bitcoind run: ./scripts/install_bitcoind.sh @@ -318,9 +327,10 @@ jobs: - name: git checkout uses: actions/checkout@v3 - - id: setup - name: Setup go env + - name: setup go ${{ env.GO_VERSION }} uses: ./.github/actions/setup-go + with: + go-version: '${{ env.GO_VERSION }}' - name: run new itest run: make itest-parallel temptest=true windows=1 tranches=2 parallel=2