From 71b60e1e2c8329bd70161979467ecfd917f4f464 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 17 Oct 2026 09:10:13 +0500 Subject: fix zizmor warnings --- action.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'action.yml') diff --git a/action.yml b/action.yml index cd6c626..e45b0f1 100644 --- a/action.yml +++ b/action.yml @@ -27,15 +27,16 @@ runs: using: composite steps: - id: install + env: + ARG_VERSION: ${{ inputs.version }} + ARG_PLATFORM: ${{ inputs.platform }} run: | - New-Variable os -Value '${{ runner.os }}' -Option Constant + $linux_host = '${{ runner.os }}' -eq 'Linux' + $windows_host = '${{ runner.os }}' -eq 'Windows' - New-Variable linux_host -Value ($os -eq 'Linux') -Option Constant - New-Variable windows_host -Value ($os -eq 'Windows') -Option Constant - - New-Variable version -Value ('${{ inputs.version }}') -Option Constant - New-Variable latest -Value ($version -eq 'latest') -Option Constant - New-Variable x64 -Value ('${{ inputs.platform }}' -eq 'x64') -Option Constant + $version = $env:ARG_VERSION + $latest = $version -eq 'latest' + $x64 = $env:ARG_PLATFORM -eq 'x64' function Locate-Choco { $path = Get-Command 'choco' -ErrorAction SilentlyContinue @@ -158,9 +159,7 @@ runs: Install-Package $packages } elseif ($windows_host) { Install-Package llvm - - $bin_dir = Join-Path $env:ProgramFiles LLVM bin - echo $bin_dir >> $env:GITHUB_PATH + echo 'C:\Program Files\LLVM\bin' >> $env:GITHUB_PATH } else { throw "Sorry, installing Clang is unsupported on $os" } @@ -170,16 +169,18 @@ runs: echo "lld=$lld" >> $env:GITHUB_OUTPUT shell: pwsh - - run: | - New-Variable os -Value '${{ runner.os }}' -Option Constant - - New-Variable linux_host -Value ($os -eq 'Linux') -Option Constant - New-Variable windows_host -Value ($os -eq 'Windows') -Option Constant + - env: + ARG_CC: ${{ inputs.cc }} + CLANG: ${{ steps.install.outputs.clang }} + CLANGXX: ${{ steps.install.outputs.clangxx }} + run: | + $linux_host = '${{ runner.os }}' -eq 'Linux' + $windows_host = '${{ runner.os }}' -eq 'Windows' - New-Variable cc -Value ('${{ inputs.cc }}' -eq '1') -Option Constant + $cc = $env:ARG_CC -eq '1' - New-Variable clang -Value '${{ steps.install.outputs.clang }}' -Option Constant - New-Variable clangxx -Value '${{ steps.install.outputs.clangxx }}' -Option Constant + $clang = $env:CLANG + $clangxx = $env:CLANGXX function Link-Exe { param( -- cgit v1.3