From 71b6b94a3aa38a5d95050d4650097c32609f19ec Mon Sep 17 00:00:00 2001 From: Scion Date: Sat, 12 Jul 2025 18:21:35 -0700 Subject: [PATCH] Added skiprestore. --- unity-project-cached-artifacts/action.yaml | 5 +++++ unity-project-cached/action.yaml | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/unity-project-cached-artifacts/action.yaml b/unity-project-cached-artifacts/action.yaml index e3d48ae..4515a37 100644 --- a/unity-project-cached-artifacts/action.yaml +++ b/unity-project-cached-artifacts/action.yaml @@ -57,6 +57,10 @@ inputs: description: "Cache path. Default: Library" required: false default: Library + skipRestore: + description: "Whether or not to skip restoring the cache. Default: false" + required: false + default: "false" compressionLevel: description: "Compression level for the artifacts." required: false @@ -97,6 +101,7 @@ runs: cachePrefix: ${{ inputs.cachePrefix }} releaseBranch: ${{ inputs.releaseBranch }} cachePath: ${{ inputs.cachePath }} + skipRestore: ${{ inputs.skipRestore }} - name: "Get product name." id: get_product_name uses: act/unity/unity-get-product-name@master diff --git a/unity-project-cached/action.yaml b/unity-project-cached/action.yaml index cebfbf9..b449171 100644 --- a/unity-project-cached/action.yaml +++ b/unity-project-cached/action.yaml @@ -57,6 +57,10 @@ inputs: description: "Cache path. Default: Library" required: false default: Library + skipRestore: + description: "Whether or not to skip restoring the cache. Default: false" + required: false + default: "false" outputs: cacheChanged: description: "Whether or not the cache was changed." @@ -84,7 +88,7 @@ runs: key: ${{ steps.command.outputs.key }} lookup-only: true - name: "Restore Library from Cache." - if: ${{ ( inputs.buildOnCacheHit == 'true' || steps.check-cache.outputs.cache-hit != 'true' ) }} + if: ${{ ( inputs.buildOnCacheHit == 'true' || steps.check-cache.outputs.cache-hit != 'true' ) && inputs.skipRestore != 'true' }} uses: https://github.com/actions/cache/restore@v3 with: path: ${{ inputs.cachePath }}