github: Only store (and delete) caches for branches not PRs

This commit is contained in:
Tobias Brunner
2026-05-08 14:42:30 +02:00
parent 93cf3de1fc
commit daa0b109da
6 changed files with 30 additions and 19 deletions
+3 -2
View File
@@ -71,10 +71,11 @@ jobs:
# delete old cache entry as we currently can't update it any other way
- env:
GH_TOKEN: ${{ github.token }}
if: steps.cache-restore.outputs.cache-hit
if: github.event_name == 'push' && steps.cache-restore.outputs.cache-hit
continue-on-error: true
run: gh cache delete -r ${{ github.ref }} ${{ steps.cache-restore.outputs.cache-primary-key }}
- uses: actions/cache/save@v5
- if: github.event_name == 'push'
uses: actions/cache/save@v5
with:
path: ~/.cache/ccache
key: ${{ steps.cache-restore.outputs.cache-primary-key }}