Skip to content

Commit

Permalink
Merge pull request #76 from nyurik/patch-1
Browse files Browse the repository at this point in the history
Show conditional enabling of caching
  • Loading branch information
sylvestre committed Nov 28, 2023
2 parents 88c8fa1 + 01a89c6 commit 1e15924
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ Just copy and paste the following in your GitHub action:
uses: mozilla-actions/sccache-action@v0.0.3
```

### Conditionally run cache and enable it

```
- name: Run sccache-cache only on non-release runs
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
uses: mozilla-actions/sccache-action@v0.0.3
- name: Set Rust caching env vars only on non-release runs
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
```

### Specify a given version of sccache

```
Expand Down

0 comments on commit 1e15924

Please sign in to comment.