-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (145 loc) · 4.97 KB
/
armbian_custom.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
152
153
154
155
156
157
158
159
160
name: "Build Custom Armbian Images"
run-name: "Building ${{ github.ref_name }} Custom Armbian Images #${{ github.run_number }}"
on:
workflow_dispatch:
repository_dispatch:
types: ["custom"]
# Ensure there is only one instance of job running
concurrency:
group: ${{ github.run_id }}-custom
cancel-in-progress: false
# Allow writing packages
permissions:
contents: read
packages: write
jobs:
build-armbian:
continue-on-error: true
strategy:
fail-fast: false
max-parallel: 3 # Reduction for testing
matrix:
release:
- trixie
- bookworm
ui:
- minimal
- server
- xfce
kernel:
- legacy
- vendor
name: Build - ${{ matrix.ui }} | ${{ matrix.release }}-${{ matrix.kernel }}
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "DATE=(date +'%y.%m.%d')" >> "$GITHUB_OUTPUT"
- name: "Checkout Armbian os"
uses: actions/checkout@v4
with:
repository: armbian/os
fetch-depth: 0
clean: false
path: os
- name: "Checkout Armbian build framework"
uses: actions/checkout@v4
with:
repository: armbian/build
fetch-depth: 0
clean: false
path: build
- name: "Checkout customisations"
uses: actions/checkout@v4
with:
ref: "armbian"
fetch-depth: 0
clean: false
path: custom
- name: Armbian Customisations
shell: bash
run: |
# read version from upstream Armbian OS
cat os/stable.json | jq '.version' | sed "s/\"//g" | sed 's/^/ARMBIAN_VERSION=/' >> $GITHUB_ENV
# [[ "${{ inputs.armbian_version }}" != '' ]] && echo "ARMBIAN_VERSION=${{ inputs.armbian_version }}" >> $GITHUB_ENV
# copy os userpatches and custom
mkdir -pv build/userpatches
rsync -av os/userpatches/. build/userpatches/
[[ -d custom/userpatches ]] && rsync -av custom/userpatches/. build/userpatches/
- shell: bash
run: |
# userspace decode
if [[ "${{ matrix.ui }}" == minimal ]]; then
BUILD_DESKTOP="no"
BUILD_MINIMAL="yes"
elif [[ "${{ matrix.ui }}" == server ]]; then
BUILD_DESKTOP="no"
BUILD_MINIMAL="no"
else
BUILD_DESKTOP="yes"
BUILD_MINIMAL="no"
DESKTOP_ENVIRONMENT="${{ matrix.ui }}"
DESKTOP_APPGROUPS_SELECTED=""
DESKTOP_ENVIRONMENT_CONFIG_NAME="config_base"
fi
# go to build folder and checkout
cd build
git checkout main
# execute build command
./compile.sh "build" \
REVISION="${{ env.ARMBIAN_VERSION }}" \
BOARD="radxa-zero3" \
BRANCH="${{ matrix.kernel }}" \
RELEASE="${{ matrix.release }}" \
KERNEL_CONFIGURE="no" \
BUILD_DESKTOP="${BUILD_DESKTOP}" \
BUILD_MINIMAL="${BUILD_MINIMAL}" \
DESKTOP_ENVIRONMENT="${DESKTOP_ENVIRONMENT}" \
DESKTOP_APPGROUPS_SELECTED="${DESKTOP_APPGROUPS_SELECTED}" \
DESKTOP_ENVIRONMENT_CONFIG_NAME="${DESKTOP_ENVIRONMENT_CONFIG_NAME}" \
# ENABLE_EXTENSIONS="${{ inputs.armbian_extensions }}" \
COMPRESS_OUTPUTIMAGE="sha,xz" \
SHARE_LOG="yes" \
EXPERT="yes"
- name: Upload Artifacts for Release
id: artifacts
uses: actions/upload-artifact@v4
with:
name: "${{ matrix.ui }}-${{ matrix.release }}-${{ matrix.kernel }}"
path: |
build/output/images/
release:
runs-on: ubuntu-latest
needs: build-armbian
steps:
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R
- uses: ncipollo/release-action@v1
with:
tag: "${{ env.ARMBIAN_VERSION }}"
name: "${{ steps.date.output.DATE }} Radxa Images"
artifacts: "./"
allowUpdates: true
removeArtifacts: false
replacesArtifacts: true
makeLatest: true
token: "${{ secrets.ARMBIAN_SELF_DISPATCH_TOKEN }}"
body: |
Radxa Custom Images:
{{ }}
# - uses: armbian/build@main
# with:
# armbian_token: "${{ secrets.GITHUB_TOKEN }}" # GitHub token
# armbian_release: "${{ matrix.release }}"
# armbian_target: "build"
# armbian_board: "radxa-zero3"
# armbian_ui: "${{ matrix.ui }}"
# armbian_kernel_branch: "${{ matrix.kernel }}"
# armbian_compress: "sha,xz"
# armbian_artifacts: "build/output/images/"
# armbian_release_tittle: "${{ steps.date.output.DATE }} Radxa Zero 3 W Images"
# armbian_release_body: "Build with [Armbian tools](https://github.com/armbian/build)"