mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-11 06:54:21 +00:00
CI: build: limit cache save/delete only on push events
Limit ccache cache save/delete only on push events. Saving ccache cache for pull request will result in bloat and refreshing ccache is not possible due to security measure on enforcing read permission on pull_request events. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> (cherry picked from commit ff66a7c1c0f012324c0d2d90f047e6976c4fba11)
This commit is contained in:
parent
15f4d6b244
commit
5bfa66bcf3
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -498,7 +498,7 @@ jobs:
|
|||||||
path: "openwrt/logs"
|
path: "openwrt/logs"
|
||||||
|
|
||||||
- name: Delete already present ccache cache
|
- name: Delete already present ccache cache
|
||||||
if: steps.restore-ccache-cache.outputs.cache-hit == 'true' && inputs.use_ccache_cache == true
|
if: steps.restore-ccache-cache.outputs.cache-hit == 'true' && inputs.use_ccache_cache == true && github.event_name == 'push'
|
||||||
uses: octokit/request-action@v2.x
|
uses: octokit/request-action@v2.x
|
||||||
with:
|
with:
|
||||||
route: DELETE /repos/{repository}/actions/caches?key={key}
|
route: DELETE /repos/{repository}/actions/caches?key={key}
|
||||||
@ -508,7 +508,7 @@ jobs:
|
|||||||
INPUT_KEY: ${{ steps.restore-ccache-cache.outputs.cache-primary-key }}
|
INPUT_KEY: ${{ steps.restore-ccache-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
- name: Save ccache cache
|
- name: Save ccache cache
|
||||||
if: inputs.use_ccache_cache == true
|
if: inputs.use_ccache_cache == true && github.event_name == 'push'
|
||||||
uses: actions/cache/save@v3
|
uses: actions/cache/save@v3
|
||||||
with:
|
with:
|
||||||
path: openwrt/.ccache
|
path: openwrt/.ccache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user