diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ffd9cd..5a1de29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,31 +50,30 @@ jobs: go version go env + # cache + - name: cache-paths + id: go-cache-paths + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + + - name: cache-build + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-build }} + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - # cache - - name: cache-paths - id: go-cache-paths - run: | - echo "::set-output name=go-build::$(go env GOCACHE)" - echo "::set-output name=go-mod::$(go env GOMODCACHE)" - - - name: cache-build - uses: actions/cache@v2 - with: - path: ${{ steps.go-cache-paths.outputs.go-build }} - key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - - - name: cache-mod - uses: actions/cache@v2 - with: - path: ${{ steps.go-cache-paths.outputs.go-mod }} - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - - - name: cache-task - uses: actions/cache@v2 - with: - path: .task/**/* - key: ${{ runner.os }}-go-task + - name: cache-mod + uses: actions/cache@v2 + with: + path: ${{ steps.go-cache-paths.outputs.go-mod }} + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} + + - name: cache-task + uses: actions/cache@v2 + with: + path: .task/**/* + key: ${{ runner.os }}-go-task # vendor - name: vendor