From f9d31fba8b37cba5c90a7131921793cd4b07ac83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Wed, 28 Dec 2022 12:37:49 +0000 Subject: [PATCH] fix(ci): use cache/restore --- .github/workflows/test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9887990d7..a22eed86b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,9 +24,10 @@ jobs: with: go-version: 1.19.4 - - name: Cache Go modules + - name: Restore cache id: cache-go-modules - uses: actions/cache@v3 + if: github.event_name == 'pull_request' + uses: actions/cache/restore@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-${{ github.ref_name }}-go-modules-${{ hashFiles('**/go.sum') }} @@ -61,9 +62,10 @@ jobs: with: go-version: 1.19.4 - - name: Cache Go modules + - name: Restore cache id: cache-go-modules - uses: actions/cache@v3 + if: github.event_name == 'pull_request' + uses: actions/cache/restore@v3 with: path: ~/go/pkg/mod key: ${{ runner.os }}-${{ github.ref_name }}-go-modules-${{ hashFiles('**/go.sum') }} @@ -294,7 +296,7 @@ jobs: with: go-version: 1.19.4 - - name: Cache Go + - name: Restore cache uses: actions/cache/restore@v3 with: path: |