Update magisk.yml

This commit is contained in:
LoveSy 2022-02-14 02:15:31 +08:00 committed by GitHub
parent d242f57139
commit 465544ba4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,11 +5,19 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
magisk_apk: magisk_apk:
description: "Magisk version. Should be stable, beta, canary or a download link to Magisk apk." description: "Magisk version"
required: true required: true
default: "stable" default: "stable"
type: choice
options:
- stable
- beta
- canary
- customize
magisk_link:
description: "Download link to Magisk's apk if you are choosing customize above."
gapps_variant: gapps_variant:
description: "Variants of gapps." description: "Variants of gapps"
required: true required: true
default: "none" default: "none"
type: choice type: choice
@ -25,7 +33,7 @@ on:
- tvstock - tvstock
- tvmini - tvmini
root_sol: root_sol:
description: "Root solution." description: "Root solution"
required: true required: true
default: "magisk" default: "magisk"
type: choice type: choice
@ -130,11 +138,13 @@ jobs:
magisk_apk = """${{ github.event.inputs.magisk_apk }}""" magisk_apk = """${{ github.event.inputs.magisk_apk }}"""
if magisk_apk == "customize":
maigks_apk = """${{ github.event.inputs.magisk_link }}"""
if not magisk_apk: if not magisk_apk:
magisk_apk = "stable" magisk_apk = "stable"
if magisk_apk == "stable" or magisk_apk == "beta" or magisk_apk == "canary": 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'] 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" out_file = "magisk.zip"
arch = "${{ matrix.arch }}" arch = "${{ matrix.arch }}"