Skip to content

Commit dc585a8

Browse files
authored
Only save cache on merge to main (#267)
1 parent 9d374e4 commit dc585a8

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
with:
3737
shared-key: ${{ runner.os }}-R-CMD-Check
3838
cache-on-failure: true
39+
save-if: ${{ github.ref == 'refs/heads/main' }}
3940

4041
- name: Check disk space
4142
run: df -h

.github/workflows/build.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
with:
4141
shared-key: ${{ runner.os }}-build
4242
cache-on-failure: true
43+
save-if: ${{ github.ref == 'refs/heads/main' }}
4344

4445
- name: Run Rust formatting check
4546
run: cargo fmt --all -- --check

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
with:
4242
shared-key: ${{ runner.os }}-publish
4343
cache-on-failure: true
44+
save-if: ${{ github.ref == 'refs/heads/main' }}
4445

4546
- name: Install wasm-pack
4647
run: cargo install wasm-pack

.github/workflows/python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
with:
4848
shared-key: ${{ matrix.os }}-python
4949
cache-on-failure: true
50+
save-if: ${{ github.ref == 'refs/heads/main' && matrix.python == '3.13' }}
5051

5152
- name: Set up MSVC (Windows)
5253
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)