diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 648b4338..68cfb7a7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -43,6 +43,11 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4ae10046..59c65def 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,9 +25,10 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- - - uses: actions/setup-go@v5 + - name: Set up Go + uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go }} + go-version-file: go.mod - run: mkdir -p ~/.config/equinix - run: touch ~/.config/equinix/metal.yaml - name: Build docs diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 4bedbb4f..48909c58 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -37,14 +37,14 @@ jobs: runs-on: ubuntu-latest concurrency: 'e2e-test' steps: - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.19' - name: Check out code into the Go module directory uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha || github.ref }} + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: Get dependencies run: go mod download - name: Run end-to-end tests diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 188b3a57..c09cf414 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,10 +16,10 @@ jobs: name: lint runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.19 - - uses: actions/checkout@v4 + go-version-file: go.mod - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: @@ -43,4 +43,4 @@ jobs: # skip-pkg-cache: true # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. - # skip-build-cache: true \ No newline at end of file + # skip-build-cache: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 815c09f8..b1fecfbe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.19 + go-version-file: go.mod - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de2562ec..eb8d1c9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,12 +6,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: - go-version: '1.19' - - name: Check out code into the Go module directory - uses: actions/checkout@v4 + go-version-file: go.mod - name: Get dependencies run: go mod download - name: Build