Skip to content

Commit 6f47f19

Browse files
authored
Update build-kernel.yml
1 parent d9569de commit 6f47f19

File tree

1 file changed

+19
-49
lines changed

1 file changed

+19
-49
lines changed

.github/workflows/build-kernel.yml

Lines changed: 19 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
78
inputs:
89
lto_type:
910
description: 'Choose LTO type (thin/full)'
@@ -34,37 +35,6 @@ on:
3435
default: false # Default to not triggering a release
3536
type: boolean
3637

37-
workflow_dispatch:
38-
inputs:
39-
lto_type:
40-
description: 'Choose LTO type (thin/full)'
41-
required: true
42-
default: 'full' # Default to 'thin' LTO
43-
type: choice
44-
options:
45-
- thin
46-
- full
47-
build_android_12:
48-
description: 'Build Android 12 GKI Kernel?'
49-
required: false # User interaction is optional
50-
default: true # Defaults to building Android 12
51-
type: boolean
52-
build_android_13:
53-
description: 'Build Android 13 GKI Kernel?'
54-
required: false # User interaction is optional
55-
default: true # Defaults to building Android 13
56-
type: boolean
57-
build_android_14:
58-
description: 'Build Android 14 GKI Kernel?'
59-
required: false # User interaction is optional
60-
default: true # Defaults to building Android 14
61-
type: boolean
62-
make_release:
63-
description: 'Trigger release after the build?'
64-
required: false # User interaction is optional
65-
default: true # Default to not triggering a release
66-
type: boolean
67-
6838
jobs:
6939
# Validation Step
7040
validate-inputs:
@@ -73,43 +43,43 @@ jobs:
7343
steps:
7444
- name: Validate Inputs
7545
run: |
76-
if [ "${{ inputs.build_android_12 }}" != true ] && [ "${{ inputs.build_android_13 }}" != true ] && [ "${{ inputs.build_android_14 }}" != true ]; then
46+
if [ "${{ inputs.build_android_12 }}" != "true" ] && [ "${{ inputs.build_android_13 }}" != "true" ] && [ "${{ inputs.build_android_14 }}" != "true" ]; then
7747
echo "At least one kernel build must be selected!"
7848
exit 1
7949
fi
8050
8151
# Build Android 12 GKI Kernel
8252
build-kernel-a12:
8353
if: ${{ inputs.build_android_12 == true }}
84-
needs: validate-inputs
85-
uses: ./.github/workflows/build-kernel-a12.yml
86-
with:
87-
lto_type: ${{ inputs.lto_type }}
88-
secrets: inherit
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Build Android 12 Kernel
57+
run: echo "Building Android 12 GKI Kernel"
8958

9059
# Build Android 13 GKI Kernel
9160
build-kernel-a13:
9261
if: ${{ inputs.build_android_13 == true }}
93-
needs: validate-inputs
94-
uses: ./.github/workflows/build-kernel-a13.yml
95-
with:
96-
lto_type: ${{ inputs.lto_type }}
97-
secrets: inherit
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Build Android 13 Kernel
65+
run: echo "Building Android 13 GKI Kernel"
9866

9967
# Build Android 14 GKI Kernel
10068
build-kernel-a14:
10169
if: ${{ inputs.build_android_14 == true }}
102-
needs: validate-inputs
103-
uses: ./.github/workflows/build-kernel-a14.yml
104-
with:
105-
lto_type: ${{ inputs.lto_type }}
106-
secrets: inherit
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Build Android 14 Kernel
73+
run: echo "Building Android 14 GKI Kernel"
10774

10875
# Trigger Release Job
10976
trigger-release:
11077
runs-on: ubuntu-latest
111-
needs: [build-kernel-a12, build-kernel-a13, build-kernel-a14]
112-
if: ${{ inputs.make_release == true }}
78+
needs:
79+
- build-kernel-a12
80+
- build-kernel-a13
81+
- build-kernel-a14
82+
if: ${{ inputs.make_release == true && (inputs.build_android_12 == true || inputs.build_android_13 == true || inputs.build_android_14 == true) }}
11383
steps:
11484
- name: Checkout code
11585
uses: actions/checkout@v2

0 commit comments

Comments
 (0)