forked from redrathnure/armbian-mkspi
-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (132 loc) · 3.66 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: "Build MKS-Klipad50 Image"
on:
#push:
# tags:
# - '*'
workflow_dispatch:
inputs:
#armbian_target:
# type: choice
# description: 'Build'
# required: false
# options:
# - kernel
# - build
# default: build
armbian_kernel_branch:
type: choice
description: 'Kernel branch'
options:
- legacy
- current
- edge
default: 'current'
armbian_release:
type: choice
description: 'Userspace'
options:
- jammy
- mantic
- bookworm
- trixie
- sid
default: 'bookworm'
#armbian_ui:
# type: choice
# description: 'User interface (not all works)'
# options:
# - minimal
# - server
# default: 'server'
#armbian_version:
# description: 'Version'
# required: false
# default: ''
armbian_board:
type: choice
description: 'Board'
options:
- mksklipad50
- mkspi
default: 'mksklipad50'
mksklipad50_branch:
type: choice
description: 'MKS-Klipad50:Branch'
options:
- decompiled
- main
default: 'main'
mksklipad50_compress:
type: choice
description: 'MKS-Klipad50:Compress'
options:
- img
- xz
- sha,xz
- sha,gpg,xz
default: 'sha,xz'
mksklipad50_minimal:
type: boolean
description: 'MKS-Klipad50:Minimal'
default: 'false'
mksklipad50_desktop:
type: boolean
description: 'MKS-Klipad50:Desktop'
default: 'false'
mksklipad50_bspfreeze:
type: boolean
description: 'MKS-Klipad50:BSPFreeze'
default: 'true'
tag_bump:
type: choice
description: 'Bump version'
options:
- patch
- minor
- major
default: 'patch'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{inputs.mksklipad50_branch}}
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ''
default_bump: ${{inputs.tag_bump}}
- name: Build
shell: bash
run: |
if [[ ${{inputs.mksklipad50_minimal}} == "true" ]] ; then BUILD_MINIMAL=yes ; else BUILD_MINIMAL=no ; fi
if [[ ${{inputs.mksklipad50_desktop}} == "true" ]] ; then BUILD_DESKTOP=yes ; else BUILD_DESKTOP=no ; fi
if [[ ${{inputs.mksklipad50_bspfreeze}} == "true" ]] ; then BSPFREEZE=yes ; else BSPFREEZE=no ; fi
./compile.sh \
BOARD=${{inputs.armbian_board}} \
BRANCH=${{inputs.armbian_kernel_branch}} \
RELEASE=${{inputs.armbian_release}} \
BUILD_MINIMAL=$BUILD_MINIMAL \
BUILD_DESKTOP=$BUILD_DESKTOP \
BSPFREEZE=$BSPFREEZE \
COMPRESS_OUTPUTIMAGE=${{inputs.mksklipad50_compress}} \
KERNEL_CONFIGURE=no
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Armbian-unofficial-MKS-Klipad50
path: output/images/
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: .
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "Armbian-unofficial-MKS-Klipad50/*"
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}