Refactor caching mechanism in action.yml

This update modifies the caching strategy by removing the previous cache type and introducing a new registry-based cache for builds. This change enhances the efficiency of the caching process during CI/CD workflows.
This commit is contained in:
Shkar T. Noori 2025-05-09 01:27:45 +03:00
parent 6bc379401f
commit ce1914c7e6
No known key found for this signature in database
GPG Key ID: C5E1A00F3BB78732

View File

@ -53,9 +53,6 @@ runs:
images: ${{ inputs.registry }}/${{ inputs.image }}
flavor: latest=false
tags: |
# Cache
type=raw,value=${{ github.ref_name }}-cache
# Pull Request
type=ref,event=pr
type=ref,event=pr,suffix=-{{sha}},priority=8887 # 2
@ -83,8 +80,8 @@ runs:
push: ${{ inputs.push }}
file: ${{ inputs.file }}
tags: ${{ steps.meta.outputs.tags }}
cache-to: type=inline
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.image }}:${{ github.ref_name }}-cache
cache-to: type=registry,ref=${{ inputs.registry }}/${{ inputs.image }}:buildcache,mode=max
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.image }}:buildcache
build-args: ${{ inputs.build-args }}
secrets: ${{ inputs.build-secrets }}