Skip to content

Commit

Permalink
Fix sccache for forked PRs (#28)
Browse files Browse the repository at this point in the history
* Add sccache debug logging

* Use read-only default instead of explicit specifying it

* Try read-write acces

* Clean up for submission
  • Loading branch information
mkruskal-google authored Sep 21, 2023
1 parent bd55347 commit bd23c7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sccache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ runs:
shell: bash
run: |
echo "SCCACHE_GCS_KEY_PATH=${{ steps.auth.outputs.credentials-file }}" >> $GITHUB_ENV
echo "SCCACHE_GCS_RW_MODE=READ_ONLY" >> $GITHUB_ENV
echo "SCCACHE_GCS_BUCKET=protobuf-sccache" >> $GITHUB_ENV
echo "SCCACHE_GCS_KEY_PREFIX=${{ inputs.cache-prefix }}" >> $GITHUB_ENV
# Only trusted runs should have write access to our caches.
- name: Disable sccache cache writing
if: ${{ github.event_name != 'pull_request_target' }}
- name: Enable sccache cache writing
# Always use read-write mode because of https://github.com/mozilla/sccache/issues/1886
#if: ${{ github.event_name != 'pull_request_target' }}
shell: bash
run: echo "SCCACHE_GCS_RW_MODE=READ_WRITE" >> $GITHUB_ENV

Expand Down

0 comments on commit bd23c7e

Please sign in to comment.