From 62be2162d6ee83ef1a47635048c9affbf2af0ae8 Mon Sep 17 00:00:00 2001 From: yue374 <102145692+FiorenMas@users.noreply.github.com> Date: Mon, 22 Jan 2024 22:49:30 +0700 Subject: [PATCH] Easier Manual Patch Manual patch apps easier to choose and optimize workflow code. Read FAQ to know how to manual patch https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/wiki/Frequently-Asked-Questions#q-how-do-i-use-this-repository-for-patching-my-own-app --- .github/workflows/ci.yml | 25 ++--- .github/workflows/manual-patch.yml | 91 +++++++++++++++++++ .../patch-revanced-extended-android-5.yml | 20 ---- .../patch-revanced-extended-android-6-7.yml | 20 ---- .github/workflows/patch-revanced-extended.yml | 20 ---- .github/workflows/patch-revanced.yml | 23 ----- docs/Frequently Asked Questions.md | 8 +- 7 files changed, 108 insertions(+), 99 deletions(-) create mode 100644 .github/workflows/manual-patch.yml delete mode 100644 .github/workflows/patch-revanced-extended-android-5.yml delete mode 100644 .github/workflows/patch-revanced-extended-android-6-7.yml delete mode 100644 .github/workflows/patch-revanced-extended.yml delete mode 100644 .github/workflows/patch-revanced.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f59eb3a..75b756d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: Check new patch +permissions: write-all on: schedule: - cron: "0 */6 * * *" @@ -6,7 +7,6 @@ on: jobs: check: name: Check new patch - permissions: write-all runs-on: ubuntu-latest env: repository: ${{ github.repository }} @@ -33,28 +33,29 @@ jobs: Patch-Revanced: name: Patch Revanced - permissions: write-all needs: check - uses: ./.github/workflows/patch-revanced.yml if: ${{ needs.check.outputs.check_rv == 1 }} - + uses: ./.github/workflows/manual-patch.yml + with: + org: "Revanced" Patch-Revanced-Extended: name: Patch Revanced Extended - permissions: write-all needs: check - uses: ./.github/workflows/patch-revanced-extended.yml if: ${{ needs.check.outputs.check_rve == 1 }} - + uses: ./.github/workflows/manual-patch.yml + with: + org: "Revanced Extended" Patch-Revanced-Extended-For-Android-6-7: name: Patch Revanced Extended For Android 6 & 7 - permissions: write-all needs: check - uses: ./.github/workflows/patch-revanced-extended-android-6-7.yml if: ${{ needs.check.outputs.check_rve67 == 1 }} - + uses: ./.github/workflows/manual-patch.yml + with: + org: "Revanced Extended Android 6,7" Patch-Revanced-Extended-For-Android-5: name: Patch Revanced Extended For Android 5 - permissions: write-all needs: check - uses: ./.github/workflows/patch-revanced-extended-android-5.yml if: ${{ needs.check.outputs.check_rve5 == 1 }} + uses: ./.github/workflows/manual-patch.yml + with: + org: "Revanced Extended Android 5" diff --git a/.github/workflows/manual-patch.yml b/.github/workflows/manual-patch.yml new file mode 100644 index 0000000..12c58f2 --- /dev/null +++ b/.github/workflows/manual-patch.yml @@ -0,0 +1,91 @@ +name: Manual Patch +permissions: write-all +on: + workflow_dispatch: + inputs: + org: + description: 'Which Revanced do you want to patch?' + required: true + default: 'Revanced' + type: choice + options: + - 'All' + - 'Revanced' + - 'Revanced Extended' + - 'Revanced Extended Android 6,7' + - 'Revanced Extended Android 5' + 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: Preparing to patch + uses: ./.github/actions/preparing + - name: Patch apk + run: bash src/build/Revanced-${{ matrix.Include.run }}.sh + env: + repository: ${{ github.repository }} + - name: Releasing APK files + uses: ./.github/actions/release + 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: Preparing to patch + uses: ./.github/actions/preparing + - name: Patch apk + run: bash src/build/Revanced-Extended.sh + env: + repository: ${{ github.repository }} + - name: Releasing APK files + uses: ./.github/actions/release + 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: Preparing to patch + uses: ./.github/actions/preparing + - name: Patch apk + run: bash src/build/Revanced-Extended-Android-6-7.sh + env: + repository: ${{ github.repository }} + - name: Releasing APK files + uses: ./.github/actions/release + 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: Preparing to patch + uses: ./.github/actions/preparing + - name: Patch apk + run: bash src/build/Revanced-Extended-Android-5.sh + env: + repository: ${{ github.repository }} + - name: Releasing APK files + uses: ./.github/actions/release \ No newline at end of file diff --git a/.github/workflows/patch-revanced-extended-android-5.yml b/.github/workflows/patch-revanced-extended-android-5.yml deleted file mode 100644 index 3a954c1..0000000 --- a/.github/workflows/patch-revanced-extended-android-5.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Patch Revanced Extended Android 5 -on: - workflow_dispatch: - workflow_call: -jobs: - patch: - name: Patch Revanced Extended for Android 5 - permissions: write-all - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Preparing to patch - uses: ./.github/actions/preparing - - name: Patch apk - run: bash src/build/Revanced-Extended-Android-5.sh - env: - repository: ${{ github.repository }} - - name: Releasing APK files - uses: ./.github/actions/release \ No newline at end of file diff --git a/.github/workflows/patch-revanced-extended-android-6-7.yml b/.github/workflows/patch-revanced-extended-android-6-7.yml deleted file mode 100644 index d674455..0000000 --- a/.github/workflows/patch-revanced-extended-android-6-7.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Patch Revanced Extended Android 6 & 7 -on: - workflow_dispatch: - workflow_call: -jobs: - patch: - name: Patch Revanced Extended for Android 6 & 7 - permissions: write-all - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Preparing to patch - uses: ./.github/actions/preparing - - name: Patch apk - run: bash src/build/Revanced-Extended-Android-6-7.sh - env: - repository: ${{ github.repository }} - - name: Releasing APK files - uses: ./.github/actions/release \ No newline at end of file diff --git a/.github/workflows/patch-revanced-extended.yml b/.github/workflows/patch-revanced-extended.yml deleted file mode 100644 index 6d6aec4..0000000 --- a/.github/workflows/patch-revanced-extended.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Patch Revanced Extended -on: - workflow_dispatch: - workflow_call: -jobs: - patch: - name: Patch Revanced Extended - permissions: write-all - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Preparing to patch - uses: ./.github/actions/preparing - - name: Patch apk - run: bash src/build/Revanced-Extended.sh - env: - repository: ${{ github.repository }} - - name: Releasing APK files - uses: ./.github/actions/release \ No newline at end of file diff --git a/.github/workflows/patch-revanced.yml b/.github/workflows/patch-revanced.yml deleted file mode 100644 index 5f5f566..0000000 --- a/.github/workflows/patch-revanced.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Patch Revanced -on: - workflow_dispatch: - workflow_call: -jobs: - Revanced: - name: Patch Revanced-${{ matrix.Revanced }} - permissions: write-all - runs-on: ubuntu-latest - strategy: - matrix: - Revanced: [1, 2, 3] - steps: - - name: Checkout - uses: actions/checkout@v4.1.1 - - name: Preparing to patch - uses: ./.github/actions/preparing - - name: Patch apk - run: bash src/build/Revanced-${{ matrix.Revanced }}.sh - env: - repository: ${{ github.repository }} - - name: Releasing APK files - uses: ./.github/actions/release diff --git a/docs/Frequently Asked Questions.md b/docs/Frequently Asked Questions.md index 87ca6f9..14cb3f1 100644 --- a/docs/Frequently Asked Questions.md +++ b/docs/Frequently Asked Questions.md @@ -12,8 +12,8 @@ You should [fork](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-No Click "I understand my workflows, go ahead and enable them" ![Click "I understand my workflows, go ahead and enable them"](https://i.imgur.com/OjI1Pxa.png) -Follow these steps to run the workflow for patching Revanced apps! -![](https://i.imgur.com/rU5HeGG.png) +Follow these steps to run the workflow for Manual Patch apps! +![](https://i.imgur.com/qFoOyxl.png) By default, the Readme.md file uses links to download my patched apps, but if you want to change the Readme.md file to download your own patched apps, you should run the workflow named `Fix Readme`. The steps are similar to when you patch Revanced apps. ![](https://i.imgur.com/pMjwc3S.png) @@ -22,7 +22,7 @@ By default, the Readme.md file uses links to download my patched apps, but if yo ### Q: How do I use this repository for building MicroG? -Here are the steps to help you build MicroG using [inotia00](https://github.com/inotia00/VancedMicroG) source code with GitHub Actions. I'm not implying that downloading directly from inotia00's repository is dangerous, but it's always wise to exercise caution when working with online resources. +Here are the steps to help you build MicroG using [inotia00](https://github.com/inotia00/VancedMicroG) source code with GitHub Actions. I'm not implying that downloading directly from inotia00's repository is dangerous, but using prebuilt file not safe at all. You should [fork](https://github.com/FiorenMas/Revanced-And-Revanced-Extended-Non-Root/fork) the repository, and then move to the `Action` tab ![Click Action](https://i.imgur.com/GewSCbi.png) @@ -31,7 +31,7 @@ Click "I understand my workflows, go ahead and enable them" ![Click "I understand my workflows, go ahead and enable them"](https://i.imgur.com/OjI1Pxa.png) Follow these steps to run the workflow for patching MicroG! -![](https://i.imgur.com/VFECO6q.png) +![](https://i.imgur.com/UR7JmeG.png) ---