This commit is contained in:
siritami
2024-03-18 15:39:42 +07:00
parent 36d760e17c
commit 893db90ed1
3 changed files with 30 additions and 17 deletions

View File

@@ -8,7 +8,7 @@ runs:
script: | script: |
const maxRetries = ${{ env.max_retries }}; const maxRetries = ${{ env.max_retries }};
let retryCount = Number('${{ env.retry_count }}'); let retryCount = Number('${{ env.retry_count }}');
const orgInput = '${{ github.event.inputs.org }}' || '${{ inputs.org }}'; const orgInput = '${{ env.org_event_input }}' || '${{ env.org_input }}';
if (retryCount < maxRetries) { if (retryCount < maxRetries) {
retryCount += 1; retryCount += 1;
await github.rest.actions.createWorkflowDispatch({ await github.rest.actions.createWorkflowDispatch({

View File

@@ -5,6 +5,8 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
retry_count: ${{ github.event.inputs.retry_count }} retry_count: ${{ github.event.inputs.retry_count }}
max_retries: 3 max_retries: 3
org_input: ${{ inputs.org }}
org_event_input: ${{ github.event.inputs.org }}
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
@@ -60,10 +62,11 @@ jobs:
if: steps.check-gh-rv.outputs.internet_error == '0' if: steps.check-gh-rv.outputs.internet_error == '0'
run: bash src/build/Revanced-${{ matrix.Include.run }}.sh run: bash src/build/Revanced-${{ matrix.Include.run }}.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rv
if: steps.check-gh-rv.outputs.internet_error == '0' if: steps.check-gh-rv.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rv.outcome == 'skipped' && env.retry_count < env.max_retries && matrix.Include.run == '1' if: always() && steps.patch-rv.outcome == 'skipped' || steps.release-rv.outcome == 'skipped' && env.retry_count < env.max_retries && matrix.Include.run == '1'
uses: ./.github/actions/re-run uses: ./.github/actions/re-run
patch_rv_beta: patch_rv_beta:
name: Patch Revanced Beta name: Patch Revanced Beta
@@ -91,10 +94,11 @@ jobs:
if: steps.check-gh-rvb.outputs.internet_error == '0' if: steps.check-gh-rvb.outputs.internet_error == '0'
run: bash src/build/Revanced-Beta-${{ matrix.Include.run }}.sh run: bash src/build/Revanced-Beta-${{ matrix.Include.run }}.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rvb
if: steps.check-gh-rvb.outputs.internet_error == '0' if: steps.check-gh-rvb.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rvb.outcome == 'skipped' && env.retry_count < env.max_retries if: always() && steps.patch-rvb.outcome == 'skipped' || steps.release-rvb.outcome == 'skipped' && env.retry_count < env.max_retries && matrix.Include.run == '1'
uses: ./.github/actions/re-run uses: ./.github/actions/re-run
patch_rex: patch_rex:
name: Patch ReX name: Patch ReX
@@ -113,10 +117,11 @@ jobs:
if: steps.check-gh-rex.outputs.internet_error == '0' if: steps.check-gh-rex.outputs.internet_error == '0'
run: bash src/build/ReX.sh run: bash src/build/ReX.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rex
if: steps.check-gh-rex.outputs.internet_error == '0' if: steps.check-gh-rex.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rex.outcome == 'skipped' && env.retry_count < env.max_retries if: always() && steps.patch-rex.outcome == 'skipped' || steps.patch-rex.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run uses: ./.github/actions/re-run
patch_rex_anddea: patch_rex_anddea:
name: Patch ReX forked by anddea name: Patch ReX forked by anddea
@@ -131,14 +136,15 @@ jobs:
id: check-gh-rex-anddea id: check-gh-rex-anddea
run: bash src/etc/connection.sh run: bash src/etc/connection.sh
- name: Patch apk - name: Patch apk
id: patch-rex id: patch-rex-anddea
if: steps.check-gh-rex-anddea.outputs.internet_error == '0' if: steps.check-gh-rex-anddea.outputs.internet_error == '0'
run: bash src/build/ReX-anddea.sh run: bash src/build/ReX-anddea.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rex-anddea
if: steps.check-gh-rex-anddea.outputs.internet_error == '0' if: steps.check-gh-rex-anddea.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rex-anddea.outcome == 'skipped' && env.retry_count < env.max_retries if: always() && steps.patch-rex-anddea.outcome == 'skipped' || steps.release-rex-anddea.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run uses: ./.github/actions/re-run
patch_rve: patch_rve:
name: Patch Revanced Extended name: Patch Revanced Extended
@@ -157,10 +163,11 @@ jobs:
if: steps.check-gh-rve.outputs.internet_error == '0' if: steps.check-gh-rve.outputs.internet_error == '0'
run: bash src/build/Revanced-Extended.sh run: bash src/build/Revanced-Extended.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rve
if: steps.check-gh-rve.outputs.internet_error == '0' if: steps.check-gh-rve.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rve.outcome == 'skipped' && env.retry_count < env.max_retries if: always() && steps.patch-rve.outcome == 'skipped' || steps.patch-rve.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run uses: ./.github/actions/re-run
patch_twitter_piko_stable: patch_twitter_piko_stable:
name: Patch Twitter Piko Stable name: Patch Twitter Piko Stable
@@ -179,10 +186,11 @@ jobs:
if: steps.check-gh-piko-stable.outputs.internet_error == '0' if: steps.check-gh-piko-stable.outputs.internet_error == '0'
run: bash src/build/Piko.sh latest run: bash src/build/Piko.sh latest
- name: Releasing APK files - name: Releasing APK files
if: steps.check-gh-rex-rufusin.outputs.internet_error == '0' id: release-piko-stable
if: steps.check-gh-piko-stable.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-piko-stable.outcome == 'skipped' && env.retry_count < env.max_retries 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 uses: ./.github/actions/re-run
patch_twitter_piko_beta: patch_twitter_piko_beta:
name: Patch Twitter Piko Beta name: Patch Twitter Piko Beta
@@ -201,10 +209,11 @@ jobs:
if: steps.check-gh-piko-beta.outputs.internet_error == '0' if: steps.check-gh-piko-beta.outputs.internet_error == '0'
run: bash src/build/Piko.sh prerelease run: bash src/build/Piko.sh prerelease
- name: Releasing APK files - name: Releasing APK files
if: steps.check-gh-rex-rufusin.outputs.internet_error == '0' id: release-piko-beta
if: steps.check-gh-piko-beta.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-piko-beta.outcome == 'skipped' && env.retry_count < env.max_retries 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 uses: ./.github/actions/re-run
patch_rve67: patch_rve67:
name: Patch Revanced Extended Android 6,7 name: Patch Revanced Extended Android 6,7
@@ -223,10 +232,11 @@ jobs:
if: steps.check-gh-rve67.outputs.internet_error == '0' if: steps.check-gh-rve67.outputs.internet_error == '0'
run: bash src/build/Revanced-Extended-Android-6-7.sh run: bash src/build/Revanced-Extended-Android-6-7.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rve67
if: steps.check-gh-rve67.outputs.internet_error == '0' if: steps.check-gh-rve67.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rve67.outcome == 'skipped' && env.retry_count < env.max_retries if: always() && steps.patch-rve67.outcome == 'skipped' || steps.release-rve67.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run uses: ./.github/actions/re-run
patch_rve5: patch_rve5:
name: Patch Revanced Extended Android 5 name: Patch Revanced Extended Android 5
@@ -245,8 +255,9 @@ jobs:
if: steps.check-gh-rve5.outputs.internet_error == '0' if: steps.check-gh-rve5.outputs.internet_error == '0'
run: bash src/build/Revanced-Extended-Android-5.sh run: bash src/build/Revanced-Extended-Android-5.sh
- name: Releasing APK files - name: Releasing APK files
id: release-rve5
if: steps.check-gh-rve5.outputs.internet_error == '0' if: steps.check-gh-rve5.outputs.internet_error == '0'
uses: ./.github/actions/release uses: ./.github/actions/release
- name: Re-run workflow if github connection not stable - name: Re-run workflow if github connection not stable
if: always() && steps.patch-rve5.outcome == 'skipped' && env.retry_count < env.max_retries if: always() && steps.patch-rve5.outcome == 'skipped' || steps.release-rve5.outcome == 'skipped' && env.retry_count < env.max_retries
uses: ./.github/actions/re-run uses: ./.github/actions/re-run

View File

@@ -46,7 +46,7 @@ dl_gh() {
if [[ $line == *"\"browser_download_url\":"* ]]; then if [[ $line == *"\"browser_download_url\":"* ]]; then
if [ $assets -eq 1 ]; then if [ $assets -eq 1 ]; then
url=$(echo $line | cut -d '"' -f 4) url=$(echo $line | cut -d '"' -f 4)
if [[ $url != *.asc ]]; then if [[ $url != *.asc ]] && [[ $url != *.json ]]; then
name=$(basename "$url") name=$(basename "$url")
wget -q -O "$name" "$url" wget -q -O "$name" "$url"
green_log "[+] Downloading $name from $owner" green_log "[+] Downloading $name from $owner"
@@ -66,8 +66,10 @@ dl_gh() {
wget -qO- "https://api.github.com/repos/$2/$repo/releases/tags/$3" \ wget -qO- "https://api.github.com/repos/$2/$repo/releases/tags/$3" \
| jq -r '.assets[] | "\(.browser_download_url) \(.name)"' \ | jq -r '.assets[] | "\(.browser_download_url) \(.name)"' \
| while read -r url names; do | while read -r url names; do
if [[ $names != *.json ]]; then
green_log "[+] Downloading $names from $2" green_log "[+] Downloading $names from $2"
wget -q -O "$names" $url wget -q -O "$names" $url
fi
done done
done done
fi fi