forked from coreybutler/nvm-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.56 KB
/
scanner.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Virus Scan
on:
workflow_run:
workflows: ["Release"]
types:
- completed
jobs:
scan:
if: ${{ github.event.workflow_run.conclusion }} == 'success'
runs-on: ubuntu-latest
steps:
- name: Get latest release details
id: get_latest_release
uses: actions/github-script@v6
with:
script: |
const { data: latestRelease } = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
});
core.setOutput('tag', latestRelease.tag_name);
core.setOutput('assets', JSON.stringify(latestRelease.assets));
- name: Download release assets
env:
ASSETS_JSON: ${{ steps.get_latest_release.outputs.assets }}
run: |
echo "Assets: $ASSETS_JSON"
for asset in $(echo $ASSETS_JSON | jq -r '.[].browser_download_url'); do
echo "Downloading $asset"
curl -L -O "$asset"
done
- name: List downloaded assets
run: ls -alh ./
- name: Scan
uses: WoozyMasta/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
file_globs: |
*.exe
*.zip
# - name: Scan with VirusTotal
# uses: crazy-max/ghaction-virustotal@v4
# with:
# vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
# files: |
# *.exe
# .exe$
# update_release_body: true
# github_token: ${{ secrets.GITHUB_TOKEN }}
# request_rate: 4