Files
Revanced-And-Revanced-Exten…/.github/workflows/manual-patch.yml
Fioren 4de3ccd8cb fix
2024-03-01 22:06:05 +07:00

181 lines
6.8 KiB
YAML

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
on:
workflow_dispatch:
inputs:
org:
description: 'Which Revanced do you want to patch?'
required: true
default: 'Revanced'
type: choice
options:
- 'All'
- 'Revanced'
- 'Revanced Beta'
- 'ReX'
- 'Revanced Extended'
- 'Revanced Extended Android 6,7'
- 'Revanced Extended Android 5'
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
if: ${{ github.event.inputs.org == 'Revanced' || github.event.inputs.org == 'All' || inputs.org == 'Revanced' }}
runs-on: ubuntu-latest
strategy:
matrix:
Include:
- org: "Revanced"
run: "1"
- org: "Revanced"
run: "2"
- org: "Revanced"
run: "3"
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check github connection
id: check-gh
run: bash src/etc/connection.sh
- name: Preparing to patch
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/preparing
- name: Patch apk
id: patch
if: steps.check-gh.outputs.internet_error == '0'
run: bash src/build/Revanced-${{ matrix.Include.run }}.sh
- name: Releasing APK files
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable
if: always() && steps.patch.outcome == 'skipped' && env.retry_count < env.max_retries && matrix.Include.run == '1'
uses: ./.github/actions/re-run
patch_rv_beta:
name: Patch Revanced Beta
if: ${{ github.event.inputs.org == 'Revanced Beta' || github.event.inputs.org == 'All' || inputs.org == 'Revanced Beta' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check github connection
id: check-gh
run: bash src/etc/connection.sh
- name: Preparing to patch
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/preparing
- name: Patch apk
id: patch
if: steps.check-gh.outputs.internet_error == '0'
run: bash src/build/Revanced-Beta.sh
- name: Releasing APK files
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable
if: always() && steps.patch.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run
patch_rex:
name: Patch ReX
if: ${{ github.event.inputs.org == 'ReX' || github.event.inputs.org == 'All' || inputs.org == 'ReX' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check github connection
id: check-gh
run: bash src/etc/connection.sh
- name: Preparing to patch
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/preparing
- name: Patch apk
id: patch
if: steps.check-gh.outputs.internet_error == '0'
run: bash src/build/ReX.sh
- name: Releasing APK files
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable
if: always() && steps.patch.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run
patch_rve:
name: Patch Revanced Extended
if: ${{ github.event.inputs.org == 'Revanced Extended' || github.event.inputs.org == 'All' || inputs.org == 'Revanced Extended' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check github connection
id: check-gh
run: bash src/etc/connection.sh
- name: Preparing to patch
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/preparing
- name: Patch apk
id: patch
if: steps.check-gh.outputs.internet_error == '0'
run: bash src/build/Revanced-Extended.sh
- name: Releasing APK files
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable
if: always() && steps.patch.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run
patch_rve67:
name: Revanced Extended Android 6,7
if: ${{ github.event.inputs.org == 'Revanced Extended Android 6,7' || github.event.inputs.org == 'All' || inputs.org == 'Revanced Extended Android 6,7' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check github connection
id: check-gh
run: bash src/etc/connection.sh
- name: Preparing to patch
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/preparing
- name: Patch apk
id: patch
if: steps.check-gh.outputs.internet_error == '0'
run: bash src/build/Revanced-Extended-Android-6-7.sh
- name: Releasing APK files
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable
if: always() && steps.patch.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run
patch_rve5:
name: Revanced Extended Android 5
if: ${{ github.event.inputs.org == 'Revanced Extended Android 5' || github.event.inputs.org == 'All' || inputs.org == 'Revanced Extended Android 5' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Check github connection
id: check-gh
run: bash src/etc/connection.sh
- name: Preparing to patch
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/preparing
- name: Patch apk
id: patch
if: steps.check-gh.outputs.internet_error == '0'
run: bash src/build/Revanced-Extended-Android-5.sh
- name: Releasing APK files
if: steps.check-gh.outputs.internet_error == '0'
uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable
if: always() && steps.patch.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run