diff --git a/.github/workflows/native-provider-bump.yml b/.github/workflows/native-provider-bump.yml index b5c734f..20e5e90 100644 --- a/.github/workflows/native-provider-bump.yml +++ b/.github/workflows/native-provider-bump.yml @@ -31,9 +31,11 @@ jobs: with: go-version: ${{ inputs.go-version }} - - name: Find the Go Build Cache + - name: Find Go Caches id: go - run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + run: | + echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + echo "modcache=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT - name: Cache the Go Build Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 @@ -45,7 +47,7 @@ jobs: - name: Cache Go Dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 with: - path: .work/pkg + path: ${{ steps.go.outputs.modcache }} key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-pkg- diff --git a/.github/workflows/pr-comment-trigger.yml b/.github/workflows/pr-comment-trigger.yml index b150438..027d3ad 100644 --- a/.github/workflows/pr-comment-trigger.yml +++ b/.github/workflows/pr-comment-trigger.yml @@ -126,10 +126,12 @@ jobs: OUTPUT=$(git log -1 --format='%H') echo "commit-sha=$OUTPUT" >> $GITHUB_OUTPUT - - name: Find the Go Build Cache + - name: Find Go Caches if: ${{ inputs.package-type == 'provider' }} id: go - run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + run: | + echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + echo "modcache=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT - name: Cache the Go Build Cache if: ${{ inputs.package-type == 'provider' }} @@ -139,11 +141,11 @@ jobs: key: ${{ runner.os }}-build-uptest-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-build-uptest- - - name: Cache Go Dependencies + - name: Cache the Go Dependencies if: ${{ inputs.package-type == 'provider' }} uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 with: - path: .work/pkg + path: ${{ steps.go.outputs.modcache }} key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-pkg- diff --git a/.github/workflows/provider-updoc.yml b/.github/workflows/provider-updoc.yml index ac0da16..1a3a5fb 100644 --- a/.github/workflows/provider-updoc.yml +++ b/.github/workflows/provider-updoc.yml @@ -30,9 +30,11 @@ jobs: with: go-version: ${{ env.GO_VERSION }} - - name: Find the Go Build Cache + - name: Find Go Caches id: go - run: echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + run: | + echo "cache=$(make go.cachedir)" >> $GITHUB_OUTPUT + echo "modcache=$(make go.mod.cachedir)" >> $GITHUB_OUTPUT - name: Cache the Go Build Cache uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 @@ -44,7 +46,7 @@ jobs: - name: Cache Go Dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 with: - path: .work/pkg + path: ${{ steps.go.outputs.modcache }} key: ${{ runner.os }}-updoc-pkg-${{ hashFiles('**/go.sum') }} restore-keys: ${{ runner.os }}-updoc-pkg-