Skip to content

Commit 3963172

Browse files
authored
Merge pull request input-output-hk#1770 from input-output-hk/djo/reduce_github_actions_rust_cache
Only save github action rust cache on main branch
2 parents 93da290 + be720fd commit 3963172

File tree

1 file changed

+4
-2
lines changed
  • .github/workflows/actions/toolchain-and-cache

1 file changed

+4
-2
lines changed

.github/workflows/actions/toolchain-and-cache/action.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ runs:
2121
- name: Rust Cache
2222
uses: Swatinem/rust-cache@v2
2323
with:
24+
# only save the cache on the main branch to limit github actions total cache size
25+
save-if: ${{ github.ref == 'refs/heads/main' }}
2426
key: ${{ runner.os }}-cache-v${{ inputs.cache-version }}
25-
27+
2628
- name: Install cargo tools installer
2729
uses: taiki-e/install-action@v2
2830
if: inputs.cargo-tools != ''
2931
with:
3032
tool: cargo-binstall
31-
33+
3234
- name: Install cargo tools
3335
if: inputs.cargo-tools != ''
3436
shell: bash

0 commit comments

Comments
 (0)