From cb7315c85d3c0e010ba117ca7e692ed6f18f16c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 10 Mar 2022 18:29:42 +0100 Subject: [PATCH] Re-initialize modules cache in CI --- .github/workflows/go.yml | 9 ++++----- .github/workflows/lint.yml | 8 ++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f3f5502ea..0d7e68d95 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,14 +17,13 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Cache Go modules + - name: Restore Go modules cache uses: actions/cache@v2 with: - path: ~/go - key: ${{ runner.os }}-build-${{ hashFiles('go.mod') }} + path: ~/go/pkg/mod + key: go-${{ runner.os }}-${{ hashFiles('go.mod') }} restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- + go-${{ runner.os }}- - name: Download dependencies run: go mod download diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 90e2c67e0..ea7d4ea34 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,6 +24,14 @@ jobs: - name: Check out code uses: actions/checkout@v3 + - name: Restore Go modules cache + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: go-${{ runner.os }}-${{ hashFiles('go.mod') }} + restore-keys: | + go-${{ runner.os }}- + - name: Verify dependencies run: | go mod verify