Skip to content

Commit 0201303

Browse files
committed
name, inputs, env
1 parent 0700855 commit 0201303

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

.github/actions/environment/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ runs:
2626

2727
# zstd is needed for cross OS actions/cache but missing from windows-11-arm
2828
# https://github.com/actions/partner-runner-images/issues/99
29-
- uses: ./.github/actions/setup-zstd
29+
- name: Setup zstd for Windows ARM64
30+
uses: ./.github/actions/setup-zstd
3031

3132
# See https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#xcode
3233
- name: Pin the Xcode Version

.github/actions/setup-zstd/action.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,24 @@ name: Setup zstd for Windows ARM64
22
description: |
33
zstd is needed for cross OS actions/cache but missing from windows-11-arm
44
https://github.com/actions/partner-runner-images/issues/99
5+
inputs:
6+
version:
7+
description: 'zstd version'
8+
required: false
9+
default: '1.5.7'
510

611
runs:
712
using: composite
813
steps:
9-
- if: runner.os == 'Windows' && runner.arch == 'ARM64'
14+
- name: Install zstd
15+
if: runner.os == 'Windows' && runner.arch == 'ARM64'
1016
shell: pwsh
17+
env:
18+
ZSTD_VERSION: ${{ inputs.version }}
1119
run: |
12-
$version = '1.5.7'
13-
$installDir = "$env:RUNNER_TOOL_CACHE\zstd-v$version-win64"
14-
Invoke-WebRequest -OutFile "$env:TEMP\zstd.zip" -Uri "https://github.com/facebook/zstd/releases/download/v$version/zstd-v$version-win64.zip"
20+
$url = "https://github.com/facebook/zstd/releases/download/v$env:ZSTD_VERSION/zstd-v$env:ZSTD_VERSION-win64.zip"
21+
$installDir = "$env:RUNNER_TOOL_CACHE\zstd-v$env:ZSTD_VERSION-win64"
22+
Invoke-WebRequest -OutFile "$env:TEMP\zstd.zip" -Uri $url
1523
Expand-Archive -Path "$env:TEMP\zstd.zip" -DestinationPath $env:RUNNER_TOOL_CACHE -Force
1624
echo "$installDir" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1725
& "$installDir\zstd.exe" --version

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242

4343
# zstd is needed for cross OS actions/cache but missing from windows-11-arm
4444
# https://github.com/actions/partner-runner-images/issues/99
45-
- uses: ./.github/actions/setup-zstd
45+
- name: Setup zstd for Windows ARM64
46+
uses: ./.github/actions/setup-zstd
4647

4748
- uses: actions/cache@v4
4849
id: cache

0 commit comments

Comments
 (0)