From cbf6a2940f11321c59a6174d4371c27c5ed280a0 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 20 Jul 2022 19:19:51 +0300 Subject: [PATCH] workflows: update setup-go to v3 Use built-in cache, simplify steps. --- .github/workflows/build.yml | 12 ++++-------- .github/workflows/run_tests.yml | 18 ++++-------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d2f47d63..313d3dab4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,15 +54,10 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 - - - name: Restore Go modules from cache - uses: actions/cache@v2 - with: - path: /home/runner/go/pkg/mod - key: deps-${{ hashFiles('go.sum') }} + cache: true - name: Update Go modules run: go mod download -json @@ -135,9 +130,10 @@ jobs: # For proper `deps` make target execution. - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 + cache: true - name: Login to DockerHub uses: docker/login-action@v2 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1cdac0461..7954ba104 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -101,15 +101,10 @@ jobs: git submodule update --init - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: 1.18 - - - name: Restore Go modules from cache - uses: actions/cache@v2 - with: - path: /home/runner/go/pkg/mod - key: deps-${{ hashFiles('go.sum') }} + cache: true - name: Update Go modules run: go mod download -json @@ -151,15 +146,10 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: '${{ matrix.go_versions }}' - - - name: Restore Go modules from cache - uses: actions/cache@v2 - with: - path: /home/runner/go/pkg/mod - key: deps-${{ hashFiles('go.sum') }} + cache: true - name: Update Go modules run: go mod download -json