Simplified the selection of the Magisk release (#220)

This commit is contained in:
alex-sandro92 2022-02-08 22:11:42 +01:00 committed by GitHub
parent 90f601d4a2
commit 810f902194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,9 +5,9 @@ on:
workflow_dispatch:
inputs:
magisk_apk:
description: "Download link to magisk apk."
description: "Magisk version. Should be stable, beta, canary or a download link to Magisk apk."
required: true
default: "https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@24.1/app-release.apk"
default: "stable"
gapps_variant:
description: "Variants of gapps. Should be: [none, super, stock, full, mini, micro, nano, pico, tvstock, tvmini]"
required: true
@ -109,11 +109,15 @@ jobs:
import urllib.request
import zipfile
import os
import json
import requests
magisk_apk = """${{ github.event.inputs.magisk_apk }}"""
if not magisk_apk:
magisk_apk = """https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@24.1/app-release.apk"""
magisk_apk = "stable"
if magisk_apk == "stable" or magisk_apk == "beta" or magisk_apk == "canary":
magisk_apk = json.loads(requests.get(f"https://github.com/topjohnwu/magisk-files/raw/master/{magisk_apk}.json").content)['magisk']['link']
out_file = "magisk.zip"