diff --git a/bazel-docker/action.yml b/bazel-docker/action.yml index 41cc39d..6c49fd3 100644 --- a/bazel-docker/action.yml +++ b/bazel-docker/action.yml @@ -76,7 +76,7 @@ runs: - name: Hook up repository Cache shell: bash - run: echo "BAZEL_FLAGS=$BAZEL_FLAGS --repository_cache='/workspace/${{ env.REPOSITORY_CACHE_PATH }}'" >> $GITHUB_ENV + run: echo "BAZEL_FLAGS=$BAZEL_FLAGS --repository_cache='/${{ env.REPOSITORY_CACHE_PATH }}'" >> $GITHUB_ENV - name: Validate inputs if: ${{ (inputs.bash && inputs.bazel) || (!inputs.bash && !inputs.bazel) }} diff --git a/bazel/action.yml b/bazel/action.yml index 99c5969..55f1a10 100644 --- a/bazel/action.yml +++ b/bazel/action.yml @@ -116,7 +116,7 @@ runs: - name: Hook up repository Cache shell: bash - run: echo "BAZEL_FLAGS=$BAZEL_FLAGS --repository_cache=$(pwd)/${{ env.REPOSITORY_CACHE_PATH }}" >> $GITHUB_ENV + run: echo "BAZEL_FLAGS=$BAZEL_FLAGS --repository_cache=/${{ env.REPOSITORY_CACHE_PATH }}" >> $GITHUB_ENV # TODO(b/467211650) this shouldn't be necessary, remove it - name: Append additional flags diff --git a/internal/repository-cache-restore/action.yml b/internal/repository-cache-restore/action.yml index f70f695..aeeef45 100644 --- a/internal/repository-cache-restore/action.yml +++ b/internal/repository-cache-restore/action.yml @@ -44,10 +44,10 @@ runs: - name: Restore Bazel repository cache id: restore-cache # Skip if there's already a downloaded cache - if: ${{ hashFiles(format('{0}/{1}', github.workspace, env.REPOSITORY_CACHE_PATH)) == '' }} + if: ${{ hashFiles(format('/{0}', env.REPOSITORY_CACHE_PATH)) == '' }} uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: - path: ${{ github.workspace }}/${{ env.REPOSITORY_CACHE_PATH }} + path: /${{ env.REPOSITORY_CACHE_PATH }} key: ${{ env.REPOSITORY_CACHE_NAME }} restore-keys: ${{ env.REPOSITORY_CACHE_BASE }} diff --git a/internal/repository-cache-save/action.yml b/internal/repository-cache-save/action.yml index c00ba69..5dfcc3a 100644 --- a/internal/repository-cache-save/action.yml +++ b/internal/repository-cache-save/action.yml @@ -29,5 +29,5 @@ runs: if: ${{ env.REPOSITORY_CACHE_HASH != hashFiles(format('{0}/**', env.REPOSITORY_CACHE_PATH)) }} uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 with: - path: ${{ github.workspace }}/${{ env.REPOSITORY_CACHE_PATH }} + path: /${{ env.REPOSITORY_CACHE_PATH }} key: ${{ env.REPOSITORY_CACHE_BASE }}-${{ github.sha }}