From 3452d60f329c88a50a04a52c80b811019b5498f4 Mon Sep 17 00:00:00 2001 From: Ivan De Marino Date: Sun, 21 Apr 2024 15:45:34 +0100 Subject: [PATCH] Must invoke `actions/checkout` before `actions/setup-go` to ensure we can read the desired Go version from `go.mod` --- .github/workflows/build-test.yml | 12 ++++++------ .github/workflows/release.yml | 9 +++------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 747d26c..a5f78a0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -24,6 +24,9 @@ jobs: timeout-minutes: 5 steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Setup Go uses: actions/setup-go@v5 with: @@ -31,9 +34,6 @@ jobs: cache: true check-latest: true - - name: Check out code - uses: actions/checkout@v4 - - name: Run linters uses: golangci/golangci-lint-action@v4 with: @@ -78,6 +78,9 @@ jobs: - '1.8.*' steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Setup Go uses: actions/setup-go@v5 with: @@ -85,9 +88,6 @@ jobs: cache: true check-latest: true - - name: Check out code - uses: actions/checkout@v4 - - name: Setup Terraform ${{ matrix.terraform }} uses: hashicorp/setup-terraform@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dce8ff5..172a2b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,13 +21,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Check out code uses: actions/checkout@v4 - - - name: Unshallow - run: git fetch --prune --unshallow - - - name: Set up Go + + - name: Setup Go uses: actions/setup-go@v5 with: go-version-file: 'go.mod'