mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-23 03:39:16 +01:00
Support to choose arch (#229)
This commit is contained in:
parent
80838a8be6
commit
7932903baf
38
.github/workflows/magisk.yml
vendored
38
.github/workflows/magisk.yml
vendored
@ -4,6 +4,15 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
arch:
|
||||||
|
description: "Build arch"
|
||||||
|
required: true
|
||||||
|
default: "x64 & arm64"
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- x64
|
||||||
|
- arm64
|
||||||
|
- x64 & arm64
|
||||||
magisk_apk:
|
magisk_apk:
|
||||||
description: "Magisk version"
|
description: "Magisk version"
|
||||||
required: true
|
required: true
|
||||||
@ -39,11 +48,36 @@ on:
|
|||||||
- none
|
- none
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
matrix:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Generate build matrix
|
||||||
|
id: set-matrix
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
let matrix = {};
|
||||||
|
let arch = "${{ github.event.inputs.arch }}"
|
||||||
|
switch ( arch ) {
|
||||||
|
case "x64":
|
||||||
|
matrix.arch = ["x64"];
|
||||||
|
break;
|
||||||
|
case "arm64":
|
||||||
|
matrix.arch = ["arm64"];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
matrix.arch = ["x64", "arm64"];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
core.setOutput("matrix",JSON.stringify(matrix));
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
needs: matrix
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix: ${{fromJson(needs.matrix.outputs.matrix)}}
|
||||||
arch: [x64, arm64]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Dependencies
|
- name: Dependencies
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user