workflows: CI add retention, vt: use the same url for a file and a badge

This commit is contained in:
Yuriy Liskov
2025-12-18 02:49:09 +02:00
parent 8b8b8f4534
commit 1281d2a782
3 changed files with 5 additions and 19 deletions

View File

@@ -23,5 +23,6 @@ jobs:
- uses: actions/upload-artifact@v5.0.0
with:
path: ./smarttubetv/build/outputs/apk/ststable/debug/*.apk
retention-days: 1

View File

@@ -1,4 +1,4 @@
name: VirusTotal Quick Scan
name: VirusTotal Scan
on:
release:
@@ -75,11 +75,11 @@ jobs:
apk_url="https://github.com/${{ github.repository }}/releases/download/$TAG_NAME/$filename"
if [ "$status" != "completed" ]; then
echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1)](https://www.virustotal.com/gui/file/$sha256) [$filename]($apk_url) — BAD ❌ (analysis incomplete)" >> vt_report.txt
echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1) $filename](https://www.virustotal.com/gui/file/$sha256) — BAD ❌ (analysis incomplete)" >> vt_report.txt
elif [ "$malicious" -gt 0 ]; then
echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1)](https://www.virustotal.com/gui/file/$sha256) [$filename]($apk_url) — BAD ❌" >> vt_report.txt
echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1) $filename](https://www.virustotal.com/gui/file/$sha256) — BAD ❌" >> vt_report.txt
else
echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1)](https://www.virustotal.com/gui/file/$sha256) [$filename]($apk_url)" >> vt_report.txt
echo " - [![VT](https://badges.cssnr.com/vt/id/$sha256?end=red&n=1) $filename](https://www.virustotal.com/gui/file/$sha256)" >> vt_report.txt
fi
done

View File

@@ -1,15 +0,0 @@
@echo off
echo Running %~n0...
echo This script deletes all workflow runs from the current repo.
echo WARNING: Deleted runs cannot be recovered.
REM List all workflow runs (up to 1000)
for /F "tokens=*" %%A in ('gh run list --limit 1000') do (
REM Skip the header line
if NOT "%%A"=="ID" (
echo Deleting workflow run %%A
gh run delete %%A --confirm
)
)
pause