From eeb01fcfb327a3a6d36d797a9051e14ee79241ff Mon Sep 17 00:00:00 2001 From: Jeffery Date: Wed, 8 Apr 2026 06:04:49 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20action.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3bf6f6f..eb8b34e 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,8 @@ name: 'Cache NuGet Packages' description: '快取 NUGET 套件' +inputs: + cache-arch: + description: '指定快取 NUGET 套件的架構,避免還原失敗' outputs: cache-hit: description: '表示是否命中快取' @@ -12,6 +15,6 @@ runs: uses: actions/cache@v4 with: path: ~/.nuget/packages - key: ${{ runner.os }}-${{ runner.arch }}-nuget-${{ hashFiles('NuGet.Config', '**/*.sln', '**/*.csproj', '**/global.json', '**/packages.lock.json', '**/Directory.Build.props', '**/Directory.Build.targets') }} + key: ${{ inputs.cache-arch || runner.os }}-nuget-${{ hashFiles('NuGet.Config', '**/*.sln', '**/*.csproj', '**/global.json', '**/packages.lock.json', '**/Directory.Build.props', '**/Directory.Build.targets') }} restore-keys: | - ${{ runner.os }}-${{ runner.arch }}-nuget- + ${{ inputs.cache-arch || runner.os }}-nuget-