From 1fc24e1212f077bf13bcc72a99e8655667f35d8b Mon Sep 17 00:00:00 2001 From: Alper Rifat Ulucinar Date: Wed, 4 Oct 2023 12:19:06 +0300 Subject: [PATCH] Fix the path from/to which the Go mod cache is populated in e2e test runs Signed-off-by: Alper Rifat Ulucinar --- .github/workflows/pr-comment-trigger.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr-comment-trigger.yml b/.github/workflows/pr-comment-trigger.yml index b150438..92c404b 100644 --- a/.github/workflows/pr-comment-trigger.yml +++ b/.github/workflows/pr-comment-trigger.yml @@ -126,10 +126,11 @@ jobs: OUTPUT=$(git log -1 --format='%H') echo "commit-sha=$OUTPUT" >> $GITHUB_OUTPUT - - name: Find the Go Build Cache - if: ${{ inputs.package-type == 'provider' }} + - 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 if: ${{ inputs.package-type == 'provider' }} @@ -139,11 +140,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-