From 22f13027f84f035c6ca6b3f30e804b424bc7e61d Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Thu, 8 Feb 2024 00:48:26 +0000 Subject: [PATCH] chore(gha): fix macos action/setup-go@v4 cache miss. Signed-off-by: Tiago Natel --- .github/workflows/benchmark.yml | 2 +- .github/workflows/ci-experimental.yml | 2 +- .github/workflows/ci.yml | 6 +++--- cmd/terramate/cli/cloud_credential_google.go | 4 ++-- go.mod | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 022c623ce3..13f831a5b1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -20,7 +20,7 @@ jobs: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.20' diff --git a/.github/workflows/ci-experimental.yml b/.github/workflows/ci-experimental.yml index 6f3338fa81..aee96f9418 100644 --- a/.github/workflows/ci-experimental.yml +++ b/.github/workflows/ci-experimental.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6686b030f4..625e57e294 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: with: ref: ${{ github.head_ref }} fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} @@ -76,7 +76,7 @@ jobs: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.20' @@ -97,7 +97,7 @@ jobs: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} fetch-depth: 0 - - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: go-version: '1.20' diff --git a/cmd/terramate/cli/cloud_credential_google.go b/cmd/terramate/cli/cloud_credential_google.go index 2a79dc3348..410c813a55 100644 --- a/cmd/terramate/cli/cloud_credential_google.go +++ b/cmd/terramate/cli/cloud_credential_google.go @@ -148,13 +148,13 @@ func startServer( } }() - rand.Seed(time.Now().UnixNano()) + rng := rand.New(rand.NewSource(time.Now().UnixNano())) var ln net.Listener const maxretry = 5 var retry int for retry = 0; retry < maxretry; retry++ { - addr := "127.0.0.1:" + strconv.Itoa(minPort+rand.Intn(maxPort-minPort)) + addr := "127.0.0.1:" + strconv.Itoa(minPort+rng.Intn(maxPort-minPort)) s.Addr = addr ln, err = net.Listen("tcp", addr) diff --git a/go.mod b/go.mod index dc95cfa99f..1b334d5276 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/terramate-io/terramate -go 1.18 +go 1.20 require ( github.com/alecthomas/kong v0.7.1