From cffe4009f9c47ef91360985288bf26e469f784de Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Thu, 13 Oct 2022 22:05:26 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Ask=20if=20user=20want=20VT=20Sc?= =?UTF-8?q?an?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 17 ++++++++++++++--- .github/workflows/virus-total-scan.yml | 10 ++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index a6e0db2..f5e0718 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -7,10 +7,15 @@ on: workflow_dispatch: inputs: SKIP_GITHUB_UPLOAD: - description: 'Should upload to GitHub' + description: 'Upload to GitHub' required: false type: boolean default: true + SKIP_VIRUSTOTAL_SCAN: + description: 'Scan apks with VirusTotal' + required: false + type: boolean + default: false concurrency: group: ${{ github.head_ref || github.run_id }} @@ -77,9 +82,16 @@ jobs: run: | sleep 10 + virustotal-scan: + if: ${{ inputs.SKIP_VIRUSTOTAL_SCAN }} + needs: [ upload-to-github ] + uses: ./.github/workflows/virus-total-scan.yml + secrets: + VT_API_KEY: ${{ secrets.VT_API_KEY }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + upload-to-telegram: needs: [ build-apk ] - uses: ./.github/workflows/telegram-uploader.yml secrets: TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }} @@ -87,4 +99,3 @@ jobs: TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} STICKER_ID: ${{ secrets.STICKER_ID }} - diff --git a/.github/workflows/virus-total-scan.yml b/.github/workflows/virus-total-scan.yml index 7de77af..0628f32 100644 --- a/.github/workflows/virus-total-scan.yml +++ b/.github/workflows/virus-total-scan.yml @@ -1,11 +1,13 @@ name: VirusTotal Scan on: - workflow_run: - workflows: [ "Build Revanced APK" ] - types: - - completed workflow_dispatch: + workflow_call: + secrets: + VT_API_KEY: + required: true + GH_TOKEN: + required: true jobs: virustotal: