From 6c6abc37407fd0a51a3b269964976ae6665f6b41 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Thu, 25 Aug 2022 09:40:32 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Added=20check=20to=20avoid=20run?= =?UTF-8?q?ning=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/codeql-analysis.yml | 3 +-- .github/workflows/pre-commit-autoupdate.yml | 3 ++- .github/workflows/upload-to-tg.yml | 7 ++----- .github/workflows/virus-total-scan.yml | 1 + 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f71baf4..bc65509 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -12,8 +12,7 @@ name: "CodeQL" on: - schedule: - - cron: '0 0 * * *' + workflow_dispatch: jobs: analyze: diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 0576f41..ff1aa54 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -13,6 +13,7 @@ permissions: jobs: auto-update: + if: ${{ inputs.GH_TOKEN}} runs-on: ubuntu-latest steps: - name: Checkout @@ -32,7 +33,7 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v4 with: - token: ${{ secrets.GH_TOKEN }} + token: $GH_TOKEN branch: update/pre-commit-autoupdate title: ⬆️Update pre-commit hooks commit-message: ⬆️updated pre-commit hooks diff --git a/.github/workflows/upload-to-tg.yml b/.github/workflows/upload-to-tg.yml index 1161783..c939d89 100644 --- a/.github/workflows/upload-to-tg.yml +++ b/.github/workflows/upload-to-tg.yml @@ -1,14 +1,11 @@ name: Telegram Upload on: - workflow_run: - workflows: [ "Build Revanced APK" ] - types: - - completed workflow_dispatch: # to trigger manually jobs: tg-upload: + if: ${{ inputs.TELEGRAM_API_ID }} timeout-minutes: 10 runs-on: ubuntu-latest steps: @@ -16,7 +13,7 @@ jobs: uses: nikhilbadyal/ghaction-telegram@main with: github_token: ${{ secrets.GH_TOKEN }} - telegram_api_id: ${{ secrets.TELEGRAM_API_ID }} + telegram_api_id: $TG_API_ID telegram_api_hash: ${{ secrets.TELEGRAM_API_HASH }} telegram_bot_token: ${{ secrets.TELEGRAM_BOT_TOKEN }} telegram_chat_id: ${{ secrets.TELEGRAM_CHAT_ID }} diff --git a/.github/workflows/virus-total-scan.yml b/.github/workflows/virus-total-scan.yml index 4b9c898..4247ea9 100644 --- a/.github/workflows/virus-total-scan.yml +++ b/.github/workflows/virus-total-scan.yml @@ -9,6 +9,7 @@ on: jobs: virustotal: + if: ${{ inputs.VT_API_KEY }} timeout-minutes: 5 runs-on: ubuntu-latest steps: