File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,18 @@ runs:
78
78
if : runner.os == 'Windows'
79
79
env :
80
80
CLAMAV_WIN_VERSION : clamav-1.0.4.win.x64
81
+ DB_MAIN : ${{ inputs.db_main }}
82
+ DB_DAILY : ${{ inputs.db_daily }}
81
83
shell : pwsh
82
84
run : |
83
- curl -L -o clamav.zip https://www.clamav.net/downloads/production/${{ env.CLAMAV_WIN_VERSION }}.zip
84
- tar -xf clamav.zip
85
- cp clamd.conf ${{ env.CLAMAV_WIN_VERSION }}
86
- cp freshclam.conf ${{ env.CLAMAV_WIN_VERSION }}
87
- ${{ env.CLAMAV_WIN_VERSION }}\freshclam.exe -F --update-db=bytecode `
88
- $(if ("${{ inputs.db_main }}" -eq "true") { "--update-db=main" }) `
89
- $(if ("${{ inputs.db_daily }}" -eq "true") { "--update-db=daily" })
90
- ${{ env.CLAMAV_WIN_VERSION }}\clamd.exe --install-service
85
+ $clamavDir = Join-Path $env:RUNNER_TEMP $env:CLAMAV_WIN_VERSION
86
+ $clamavZipFilePath = Join-Path $env:RUNNER_TEMP clamav.zip
87
+ Invoke-WebRequest -Uri "https://www.clamav.net/downloads/production/$env:CLAMAV_WIN_VERSION.zip" -OutFile $clamavZipFilePath
88
+ Expand-Archive -Path $clamavZipFilePath -DestinationPath $env:RUNNER_TEMP
89
+ Copy-Item clamd.conf -Destination $clamavDir
90
+ Copy-Item freshclam.conf -Destination $clamavDir
91
+ & "$clamavDir\freshclam.exe" -F --update-db=bytecode `
92
+ $(if ($env:DB_MAIN -eq "true") { "--update-db=main" }) `
93
+ $(if ($env:DB_DAILY -eq "true") { "--update-db=daily" })
94
+ & "$clamavDir\clamd.exe" --install-service
91
95
net start clamd
You can’t perform that action at this time.
0 commit comments