name: Manual Patch permissions: write-all env: repository: ${{ github.repository }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} retry_count: ${{ github.event.inputs.retry_count }} max_retries: 3 org_input: ${{ inputs.org }} org_event_input: ${{ github.event.inputs.org }} on: workflow_dispatch: inputs: org: description: 'Which "Revanced" do you want to patch?' required: true default: 'Revanced' type: choice options: - 'Revanced' - 'Revanced Beta' - 'Revanced Extended' - 'Revanced Extended Beta' - 'Revanced Extended Reddit' - 'RVE-anddea-stable' - 'RVE-anddea-beta' - 'Twitter Piko Stable' - 'Twitter Piko Beta' - 'Revanced Extended Android 6,7' - 'Revanced Extended Android 5' - 'Dropped Patches - indrastorms' retry_count: description: 'Do not change value below' required: false default: '1' workflow_call: inputs: org: required: true type: string jobs: patch_rv: name: Patch Revanced Stable if: ${{ github.event.inputs.org == 'Revanced' || inputs.org == 'Revanced' }} runs-on: ubuntu-latest strategy: matrix: run: [1, 2, 3, 4, 5, 6, 7, 8, 9] steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rv run: bash src/etc/connection.sh - name: Patch apk id: patch-rv if: steps.check-gh-rv.outputs.internet_error == '0' run: bash src/build/Revanced.sh ${{ matrix.run }} - name: Releasing APK files id: release-rv if: steps.check-gh-rv.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rv.outcome == 'skipped' || steps.release-rv.outcome == 'skipped' && env.retry_count < env.max_retries && matrix.run == '1' uses: ./.github/actions/re-run patch_rv_beta: name: Patch Revanced Beta if: ${{ github.event.inputs.org == 'Revanced Beta' || inputs.org == 'Revanced Beta' }} runs-on: ubuntu-latest strategy: matrix: run: [1, 2, 3, 4, 5, 6, 7, 8, 9] steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rvb run: bash src/etc/connection.sh - name: Patch apk id: patch-rvb if: steps.check-gh-rvb.outputs.internet_error == '0' run: bash src/build/Revanced-Beta.sh ${{ matrix.run }} - name: Releasing APK files id: release-rvb if: steps.check-gh-rvb.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rvb.outcome == 'skipped' || steps.release-rvb.outcome == 'skipped' && env.retry_count < env.max_retries && matrix.run == '1' uses: ./.github/actions/re-run patch_rve_anddea_stable: name: Patch RVX Anddea Stable if: ${{ github.event.inputs.org == 'RVE-anddea-stable' || inputs.org == 'RVE-anddea-stable' }} runs-on: ubuntu-latest strategy: matrix: run: [1, 2, 3] steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve-anddea-stable run: bash src/etc/connection.sh - name: Patch apk id: patch-rve-anddea if: steps.check-gh-rve-anddea-stable.outputs.internet_error == '0' run: bash src/build/Anddea-Revanced-Extended.sh ${{ matrix.run }} - name: Releasing APK files id: release-rve-anddea-stable if: steps.check-gh-rve-anddea-stable.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve-anddea-stable.outcome == 'skipped' || steps.release-rve-anddea-stable.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_rve_anddea_beta: name: Patch RVX Anddea Beta version if: ${{ github.event.inputs.org == 'RVE-anddea-beta' || inputs.org == 'RVE-anddea-beta' }} runs-on: ubuntu-latest strategy: matrix: run: [1, 2, 3] steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve-anddea-beta run: bash src/etc/connection.sh - name: Patch apk id: patch-rve-anddea-beta if: steps.check-gh-rve-anddea-beta.outputs.internet_error == '0' run: bash src/build/Anddea-Revanced-Extended-Beta.sh ${{ matrix.run }} - name: Releasing APK files id: release-rve-anddea-beta if: steps.check-gh-rve-anddea-beta.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve-anddea-beta.outcome == 'skipped' || steps.release-rve-anddea-beta.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_rve: name: Patch Revanced Extended Stable if: ${{ github.event.inputs.org == 'Revanced Extended' || inputs.org == 'Revanced Extended' }} runs-on: ubuntu-latest strategy: matrix: run: [1, 2, 3] steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve run: bash src/etc/connection.sh - name: Patch apk id: patch-rve if: steps.check-gh-rve.outputs.internet_error == '0' run: bash src/build/Revanced-Extended.sh ${{ matrix.run }} - name: Releasing APK files id: release-rve if: steps.check-gh-rve.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve.outcome == 'skipped' || steps.release-rve.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_rve_beta: name: Patch Revanced Extended Beta if: ${{ github.event.inputs.org == 'Revanced Extended Beta' || inputs.org == 'Revanced Extended Beta' }} runs-on: ubuntu-latest strategy: matrix: run: [1, 2, 3] steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve-beta run: bash src/etc/connection.sh - name: Patch apk id: patch-rve-beta if: steps.check-gh-rve-beta.outputs.internet_error == '0' run: bash src/build/Revanced-Extended-Beta.sh ${{ matrix.run }} - name: Releasing APK files id: release-rve-beta if: steps.check-gh-rve-beta.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve-beta.outcome == 'skipped' || steps.release-rve-beta.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_rve_reddit: name: Patch Revanced Extended Reddit if: ${{ github.event.inputs.org == 'Revanced Extended Reddit' || inputs.org == 'Revanced Extended Reddit' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve-reddit run: bash src/etc/connection.sh - name: Patch apk id: patch-rve-reddit if: steps.check-gh-rve-reddit.outputs.internet_error == '0' run: bash src/build/Revanced-Extended-Reddit.sh - name: Releasing APK files id: release-rve-reddit if: steps.check-gh-rve-reddit.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve-reddit.outcome == 'skipped' || steps.release-rve-reddit.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_twitter_piko_stable: name: Patch Twitter Piko Stable if: ${{ github.event.inputs.org == 'Twitter Piko Stable' || inputs.org == 'Twitter Piko Stable' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-piko-stable run: bash src/etc/connection.sh - name: Patch apk id: patch-piko-stable if: steps.check-gh-piko-stable.outputs.internet_error == '0' run: bash src/build/Piko.sh latest - name: Releasing APK files id: release-piko-stable if: steps.check-gh-piko-stable.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-piko-stable.outcome == 'skipped' || steps.release-piko-stable.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_twitter_piko_beta: name: Patch Twitter Piko Beta if: ${{ github.event.inputs.org == 'Twitter Piko Beta' || inputs.org == 'Twitter Piko Beta' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-piko-beta run: bash src/etc/connection.sh - name: Patch apk id: patch-piko-beta if: steps.check-gh-piko-beta.outputs.internet_error == '0' run: bash src/build/Piko.sh prerelease - name: Releasing APK files id: release-piko-beta if: steps.check-gh-piko-beta.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-piko-beta.outcome == 'skipped' || steps.release-piko-beta.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_rve67: name: Patch RVX Android 6,7 if: ${{ github.event.inputs.org == 'Revanced Extended Android 6,7' || inputs.org == 'Revanced Extended Android 6,7' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve67 run: bash src/etc/connection.sh - name: Patch apk id: patch-rve67 if: steps.check-gh-rve67.outputs.internet_error == '0' run: bash src/build/Revanced-Extended-Android-6-7.sh - name: Releasing APK files id: release-rve67 if: steps.check-gh-rve67.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve67.outcome == 'skipped' || steps.release-rve67.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_rve5: name: Patch RVX Android 5 if: ${{ github.event.inputs.org == 'Revanced Extended Android 5' || inputs.org == 'Revanced Extended Android 5' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-rve5 run: bash src/etc/connection.sh - name: Patch apk id: patch-rve5 if: steps.check-gh-rve5.outputs.internet_error == '0' run: bash src/build/Revanced-Extended-Android-5.sh - name: Releasing APK files id: release-rve5 if: steps.check-gh-rve5.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-rve5.outcome == 'skipped' || steps.release-rve5.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run patch_Dropped_Patches: name: Dropped Patches Revanced - indrastorms if: ${{ github.event.inputs.org == 'Dropped Patches - indrastorms' || inputs.org == 'Dropped Patches - indrastorms' }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.2.2 - name: Preparing to patch uses: ./.github/actions/preparing - name: Check github connection id: check-gh-Dropped-Patches-indrastorms run: bash src/etc/connection.sh - name: Patch apk id: patch-Dropped-Patches-indrastorms if: steps.check-gh-Dropped-Patches-indrastorms.outputs.internet_error == '0' run: bash src/build/Dropped-Patches-Revanced.sh - name: Releasing APK files id: release-Dropped-Patches-indrastorms if: steps.check-gh-Dropped-Patches-indrastorms.outputs.internet_error == '0' uses: ./.github/actions/release - name: Re-run workflow if github connection not stable if: always() && steps.patch-Dropped-Patches-indrastorms.outcome == 'skipped' || steps.release-Dropped-Patches-indrastorms.outcome == 'skipped' && env.retry_count < env.max_retries uses: ./.github/actions/re-run