1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

copy cache before it's deleted

This commit is contained in:
Jason N. 2024-03-07 12:49:51 -05:00
parent 7b787903d4
commit a904df0f87
3 changed files with 8 additions and 2 deletions

View file

@ -91,6 +91,7 @@ runs:
shell: bash
run: |
mkdir /cache/dnf || true
mkdir /cache/dnf_new || true
mkdir /cache/skopeo || true
- name: Run docker image
@ -101,6 +102,7 @@ runs:
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
if [[ "${{ steps.load_dnf_cache.outputs.cache-hit}}" == "false" ]]; then cache="${cache} -v /cache/dnf_new:/cache/dnf_new"; 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 }} \
@ -120,7 +122,7 @@ runs:
if: inputs.enable_cache_dnf == 'true' && steps.load_dnf_cache.outputs.cache-hit == 'false'
uses: actions/cache/save@v4
with:
path: /cache/dnf
path: /cache/dnf_new
key: ${{ inputs.dnf_cache_key || env.dnf_cache_key }}
- name: Save skopeo cache