Browse Source

Cache go packages

Matthew Jorgensen 2 years ago
parent
commit
ba15df23a8
1 changed files with 9 additions and 0 deletions
  1. 9 0
      .github/workflows/go.yml

+ 9 - 0
.github/workflows/go.yml

@@ -18,6 +18,15 @@ jobs:
       with:
         go-version: 1.17
 
+    - uses: actions/cache@v3
+      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 -v ./...