From b06184c34eda19a4c55c788c240fcd71d709cc17 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 26 Feb 2022 10:56:51 +0100 Subject: [PATCH] :construction_worker: Cache Go Dependencies in GHA --- .github/workflows/integration.yaml | 20 ++++++++++++++++++++ .github/workflows/release.yaml | 10 ++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 29ada04..b6cd9e6 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -18,6 +18,16 @@ jobs: with: go-version: '1.17.x' + - name: Cache Go Dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Vet run: go vet @@ -37,6 +47,16 @@ jobs: with: go-version: '1.17.x' + - name: Cache Go Dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Build run: go build ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 25d9fbc..14eb749 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,6 +18,16 @@ jobs: with: go-version: '1.17.x' + - name: Cache Go Dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Login to Docker Hub uses: docker/login-action@v1.13.0 with: