Skip to content

Commit 5558fb9

Browse files
Save on successful build
1 parent 341a943 commit 5558fb9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/reusable-industrial-ci-with-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ jobs:
130130
id: ici
131131
- name: Save ccache folder
132132
uses: actions/cache/save@v4
133-
# but only on default branch to save disk space
134-
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
133+
# save if build step succeeded, but only on default branch to save disk space
134+
if: ${{ always() && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && steps.ici.outputs.build_target_workspace == '0' }}
135135
with:
136136
path: ${{ env.CCACHE_DIR }}
137137
key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }}

0 commit comments

Comments
 (0)