mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
don't try to save cache if it already exists
This commit is contained in:
parent
3c01bf091f
commit
346fc7b4b3
1 changed files with 3 additions and 1 deletions
|
|
@ -61,6 +61,7 @@ runs:
|
|||
sudo chmod 777 /cache
|
||||
|
||||
- name: Load dnf cache
|
||||
id: load_cache
|
||||
env:
|
||||
dnf_cache_key: dnf-${{ inputs.version }}
|
||||
if: inputs.enable_cache_dnf == 'true'
|
||||
|
|
@ -68,6 +69,7 @@ runs:
|
|||
with:
|
||||
path: /cache/dnf
|
||||
key: ${{ inputs.dnf_cache_key || env.dnf_cache_key }}
|
||||
restore-keys: ${{ inputs.dnf_cache_key || env.dnf_cache_key }}-${{ github.}}
|
||||
|
||||
- name: Run docker image
|
||||
shell: bash
|
||||
|
|
@ -92,7 +94,7 @@ runs:
|
|||
- name: Save dnf cache
|
||||
env:
|
||||
dnf_cache_key: dnf-${{ inputs.version }}
|
||||
if: inputs.enable_cache_dnf == 'true'
|
||||
if: inputs.enable_cache_dnf == 'true' && steps.load_cache.outputs.cache-hit == 'false'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: /cache/dnf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue