diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-17 14:06:33 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-17 14:21:07 +0500 |
| commit | 00e9f83b07d700342e7143bf0cc6245d7323501c (patch) | |
| tree | 6dc67c5dda61e16889e9b94bb2670f1592c716c5 /.github/actions/common-variables | |
| parent | consistent short-vs-long parameter ordering (diff) | |
| download | cmake-common-00e9f83b07d700342e7143bf0cc6245d7323501c.tar.gz cmake-common-00e9f83b07d700342e7143bf0cc6245d7323501c.zip | |
fix some zizmor warnings
Diffstat (limited to '.github/actions/common-variables')
| -rw-r--r-- | .github/actions/common-variables/action.yml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/.github/actions/common-variables/action.yml b/.github/actions/common-variables/action.yml index 3b197da..af86aff 100644 --- a/.github/actions/common-variables/action.yml +++ b/.github/actions/common-variables/action.yml @@ -7,21 +7,21 @@ inputs: runs: using: composite steps: - - run: | - New-Variable toolset -Value '${{ inputs.toolset }}' -Option Constant + - env: + ARG_TOOLSET: ${{ inputs.toolset }} + run: | + $toolset = $env:ARG_TOOLSET - New-Variable os -Value '${{ runner.os }}' -Option Constant + $host_linux = '${{ runner.os }}' -eq 'Linux' + $host_windows = '${{ runner.os }}' -eq 'Windows' - New-Variable host_linux -Value ($os -eq 'Linux') -Option Constant - New-Variable host_windows -Value ($os -eq 'Windows') -Option Constant + $mingw = $toolset -eq 'mingw' -or ($host_windows -and $toolset -eq 'gcc') - New-Variable mingw -Value ($toolset -eq 'mingw' -or ($host_windows -and $toolset -eq 'gcc')) -Option Constant + $target_linux = $host_linux -and !$mingw + $target_windows = $mingw -or $host_windows - New-Variable target_linux -Value ($host_linux -and !$mingw) -Option Constant - New-Variable target_windows -Value ($mingw -or $host_windows) -Option Constant - - New-Variable target_pe -Value $target_windows -Option Constant - New-Variable target_elf -Value $target_linux -Option Constant + $target_pe = $target_windows + $target_elf = $target_linux function Set-BoolVar { param( |
