From 11a89e0ca9419e544335444e7ea04dfb64267215 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Tue, 30 Jan 2024 16:54:07 +0100 Subject: [PATCH] CI: No longer need to manually cache Go modules. --- .github/workflows/lint.yml | 18 ------------------ .github/workflows/tarball.yml | 18 ------------------ .github/workflows/test.yml | 18 ------------------ 3 files changed, 54 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1fb958b..666b2c1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,24 +30,6 @@ jobs: with: go-version: "1.20" - - id: go-cache-paths - run: | - echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT - echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - echo "go-version=$(go version | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT - - - name: Go build cache - uses: actions/cache@v4 - with: - path: ${{ steps.go-cache-paths.outputs.go-build }} - key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-build-${{ hashFiles('**/go.mod', '**/go.sum') }} - - - name: Go mod cache - uses: actions/cache@v4 - with: - path: ${{ steps.go-cache-paths.outputs.go-mod }} - key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-mod-${{ hashFiles('**/go.mod', '**/go.sum') }} - - name: Install dependencies run: | sudo apt -y update && sudo apt -y install protobuf-compiler diff --git a/.github/workflows/tarball.yml b/.github/workflows/tarball.yml index 241d99e..1716a05 100644 --- a/.github/workflows/tarball.yml +++ b/.github/workflows/tarball.yml @@ -33,24 +33,6 @@ jobs: with: go-version: ${{ matrix.go-version }} - - id: go-cache-paths - run: | - echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT - echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - echo "go-version=$(go version | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT - - - name: Go build cache - uses: actions/cache@v4 - with: - path: ${{ steps.go-cache-paths.outputs.go-build }} - key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-build-${{ hashFiles('**/go.mod', '**/go.sum') }} - - - name: Go mod cache - uses: actions/cache@v4 - with: - path: ${{ steps.go-cache-paths.outputs.go-mod }} - key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-mod-${{ hashFiles('**/go.mod', '**/go.sum') }} - - name: Install dependencies run: | sudo apt -y update && sudo apt -y install protobuf-compiler diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 976aa40..20619d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,24 +35,6 @@ jobs: with: go-version: ${{ matrix.go-version }} - - id: go-cache-paths - run: | - echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT - echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT - echo "go-version=$(go version | cut -d ' ' -f 3)" >> $GITHUB_OUTPUT - - - name: Go build cache - uses: actions/cache@v4 - with: - path: ${{ steps.go-cache-paths.outputs.go-build }} - key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-build-${{ hashFiles('**/go.mod', '**/go.sum') }} - - - name: Go mod cache - uses: actions/cache@v4 - with: - path: ${{ steps.go-cache-paths.outputs.go-mod }} - key: ${{ runner.os }}-${{ steps.go-cache-paths.outputs.go-version }}-mod-${{ hashFiles('**/go.mod', '**/go.sum') }} - - name: Install dependencies run: | sudo apt -y update && sudo apt -y install protobuf-compiler