diff --git a/action.yml b/action.yml index cda4f42..59e9c44 100644 --- a/action.yml +++ b/action.yml @@ -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: