Feature/validate changed files #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate | |
on: | |
pull_request: | |
jobs: | |
validate: | |
name: Validate code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install | |
run: | | |
npm ci | |
- name: Build | |
run: | | |
npm run build | |
- name: Changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v45 | |
- name: List changed files | |
env: | |
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} | |
run: | | |
for file in ${CHANGED_FILES}; do | |
node ./build/validate.js $file | |
done | |
ls ./downloads/ | |
- name: VirusTotal Scan | |
id: virustotal | |
uses: crazy-max/ghaction-virustotal@v4 | |
with: | |
vt_api_key: ${{ secrets.VT_API_KEY }} | |
request_rate: 4 | |
files: ./downloads/* | |
- name: VirusTotal Report | |
uses: actions/github-script@v7 | |
env: | |
ANALYSIS: ${{steps.virustotal.outputs.analysis}} | |
with: | |
script: | | |
const { ANALYSIS } = process.env; | |
console.log(ANALYSIS); |