Skip to content

Commit

Permalink
Install ClamAV in temporary directory
Browse files Browse the repository at this point in the history
  • Loading branch information
toblux committed Apr 4, 2024
1 parent 192dd76 commit ad9c7cf
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ runs:
if: runner.os == 'Windows'
env:
CLAMAV_WIN_VERSION: clamav-1.0.4.win.x64
DB_MAIN: ${{ inputs.db_main }}
DB_DAILY: ${{ inputs.db_daily }}
shell: pwsh
run: |
curl -L -o clamav.zip https://www.clamav.net/downloads/production/${{ env.CLAMAV_WIN_VERSION }}.zip
tar -xf clamav.zip
cp clamd.conf ${{ env.CLAMAV_WIN_VERSION }}
cp freshclam.conf ${{ env.CLAMAV_WIN_VERSION }}
${{ env.CLAMAV_WIN_VERSION }}\freshclam.exe -F --update-db=bytecode `
$(if ("${{ inputs.db_main }}" -eq "true") { "--update-db=main" }) `
$(if ("${{ inputs.db_daily }}" -eq "true") { "--update-db=daily" })
${{ env.CLAMAV_WIN_VERSION }}\clamd.exe --install-service
net start clamd
$clamavInstallDir = Join-Path $env:RUNNER_TEMP $env:CLAMAV_WIN_VERSION
$clamavZipFilePath = Join-Path $env:RUNNER_TEMP clamav.zip
Invoke-WebRequest -Uri "https://www.clamav.net/downloads/production/$env:CLAMAV_WIN_VERSION.zip" -OutFile $clamavZipFilePath
Expand-Archive -Path $clamavZipFilePath -DestinationPath $clamavInstallDir
Copy-Item clamd.conf -Destination $clamavInstallDir
Copy-Item freshclam.conf -Destination $clamavInstallDir
dir $clamavInstallDir

0 comments on commit ad9c7cf

Please sign in to comment.