diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index 0fbf7ae..da3fcf7 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -67,16 +67,20 @@ jobs: sleep 10 virustotal-scan: - if: ${{ inputs.SKIP_VIRUSTOTAL_SCAN }} needs: [ upload-to-github ] - uses: ./.github/workflows/virus-total-scan.yml + uses: nikhilbadyal/ghactions/.github/workflows/virustotal-scan.yml@main + with: + FILES: | + .apk$ + request_rate: 4 + if: ${{ inputs.SKIP_VIRUSTOTAL_SCAN }} 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 + uses: nikhilbadyal/ghactions/.github/workflows/telegram-uploader.yml@main secrets: TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }} TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }} @@ -85,6 +89,7 @@ jobs: STICKER_ID: ${{ secrets.STICKER_ID }} CHANGELOG_GITHUB_REPOSITORY: ${{ secrets.CHANGELOG_GITHUB_REPOSITORY }} + cleanup: name: GitHub Cleanup if: ${{ inputs.CLEANUP }} diff --git a/.github/workflows/github-cleanup.yml b/.github/workflows/github-cleanup.yml index aa8073e..d56973f 100644 --- a/.github/workflows/github-cleanup.yml +++ b/.github/workflows/github-cleanup.yml @@ -18,3 +18,9 @@ jobs: with: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} RELEASE_PATTERN: '[\s\S]*' + + - name: Delete Workflow Runs + uses: nikhilbadyal/ghactions/.github/workflows/github-workflow-cleaner.yml@main + with: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index 537314f..0000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Linter - -env: - DOCKER_BUILDKIT: 1 - COMPOSE_DOCKER_CLI_BUILD: 1 - -on: - workflow_call: - workflow_dispatch: - - -jobs: - linter: - timeout-minutes: 5 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.1.0 - - - name: Setup Python - uses: actions/setup-python@v4.3.0 - with: - python-version: "3.10" - cache: pip - cache-dependency-path: | - requirements.txt - - - name: Run pre-commit - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index b0bebb1..49291a0 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -9,7 +9,9 @@ on: jobs: linter-pr-check: - uses: ./.github/workflows/linter.yml + uses: nikhilbadyal/ghactions/.github/workflows/python-linter.yml@main + with: + PYTHON_VERSION: '3.10' build-apk-pr-check: uses: ./.github/workflows/build-artifact.yml secrets: diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index bba5ff7..2cd55bb 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -10,30 +10,9 @@ permissions: jobs: auto-update: - timeout-minutes: 5 + uses: nikhilbadyal/ghactions/.github/workflows/python-precommit-updater.yml@main if: github.repository == 'nikhilbadyal/docker-py-revanced' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.1.0 - - - name: Setup Python - uses: actions/setup-python@v4.3.0 - with: - python-version: '3.x' - - - name: Install pre-commit - run: pip install pre-commit - - - name: Updated Hooks - run: pre-commit autoupdate - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4.1.3 - with: - token: ${{ secrets.GH_TOKEN }} - branch: update/pre-commit-autoupdate - title: ⬆️Update pre-commit hooks - commit-message: ⬆️updated pre-commit hooks - body: ✨Update versions of tools in pre-commit configs to latest version - labels: pre-commit✨ + secrets: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + with: + PYTHON_VERSION: '3.10' diff --git a/.github/workflows/telegram-uploader-custom.yml b/.github/workflows/telegram-uploader-custom.yml index b3e0d72..bf0c9d8 100644 --- a/.github/workflows/telegram-uploader-custom.yml +++ b/.github/workflows/telegram-uploader-custom.yml @@ -31,7 +31,7 @@ on: jobs: tg-upload: - uses: ./.github/workflows/telegram-uploader.yml + uses: nikhilbadyal/ghactions/.github/workflows/telegram-uploader.yml@main secrets: TELEGRAM_API_ID: ${{ inputs.API_ID }} TELEGRAM_API_HASH: ${{ inputs.API_HASH }} diff --git a/.github/workflows/telegram-uploader.yml b/.github/workflows/telegram-uploader.yml deleted file mode 100644 index 090d99e..0000000 --- a/.github/workflows/telegram-uploader.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Telegram Upload - -on: - workflow_dispatch: - workflow_call: - secrets: - TELEGRAM_API_ID: - required: true - TELEGRAM_API_HASH: - required: true - TELEGRAM_BOT_TOKEN: - required: true - TELEGRAM_CHAT_ID: - required: true - STICKER_ID: - required: true - CHANGELOG_GITHUB_REPOSITORY: - required: false - -jobs: - tg-upload: - name: Telegram Upload - timeout-minutes: 5 - runs-on: ubuntu-latest - steps: - - name: Upload to Telegram - if: ${{ env.HAVE_TELEGRAM_API_ID == 'true' }} - uses: nikhilbadyal/ghaction-telegram-uploader@main - with: - API_ID: ${{ secrets.TELEGRAM_API_ID }} - API_HASH: ${{ secrets.TELEGRAM_API_HASH }} - BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} - CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} - STICKER_ID: ${{ secrets.STICKER_ID }} - CHANGELOG_GITHUB_REPOSITORY: ${{ secrets.CHANGELOG_GITHUB_REPOSITORY }} -env: - HAVE_TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID != '' }} diff --git a/main.py b/main.py index 4204b70..9bd9916 100644 --- a/main.py +++ b/main.py @@ -41,9 +41,7 @@ def main() -> None: output = "-custom-icon-" if was_og_build else "" app = "youtube" _, version, is_experimental = patcher.get_app_configs(app) - logger.info(parser.get_all_patches()) parser.invert_patch(branding_patch) - logger.info(parser.get_all_patches()) parser.patch_app( app=app, version=version,