mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
pass in skopeo cache
This commit is contained in:
parent
7807e0d806
commit
1ec2b525f7
1 changed files with 3 additions and 2 deletions
|
|
@ -80,7 +80,7 @@ runs:
|
|||
- name: Load skopeo cache
|
||||
id: load_skopeo_cache
|
||||
env:
|
||||
skopeo_cache_key: skopeo-${{ inputs.image_name }}-${{ inputs.image_tag }}
|
||||
skopeo_cache_key: skopeo-${{ inputs.image_name }}-${{ inputs.version || inputs.image_tag }}
|
||||
if: inputs.enable_cache_skopeo == 'true'
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
|
|
@ -100,6 +100,7 @@ runs:
|
|||
if [[ -z "${{ github.action_ref }}" ]]; then if [[ "${{ github.ref_name }}" =~ (.*)/merge ]]; then tag=pr-${BASH_REMATCH[1]}; else tag=${{ github.ref_name }}; fi; fi
|
||||
if [[ -z "${tag}" ]]; then tag=${{ github.action_ref }}; fi
|
||||
if [[ "${{ inputs.enable_cache_dnf }}" == "true" ]]; then cache="${cache} -v /cache/dnf:/cache/dnf"; fi
|
||||
if [[ "${{ inputs.enable_cache_skopeo }}" == "true" ]]; then cache="${cache} -v /cache/skopeo:/cache/skopeo"; fi
|
||||
docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ${cache} ghcr.io/jasonn3/build-container-installer:${tag} \
|
||||
ARCH=${{ inputs.arch }} \
|
||||
IMAGE_NAME=${{ inputs.image_name }} \
|
||||
|
|
@ -124,7 +125,7 @@ runs:
|
|||
|
||||
- name: Save skopeo cache
|
||||
env:
|
||||
skopeo_cache_key: skopeo-${{ inputs.image_name }}-${{ inputs.image_tag }}
|
||||
skopeo_cache_key: skopeo-${{ inputs.image_name }}-${{ inputs.version || inputs.image_tag }}
|
||||
if: inputs.enable_cache_skopeo == 'true' && steps.load_skopeo_cache.outputs.cache-hit == 'false'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue