-
Notifications
You must be signed in to change notification settings - Fork 1.9k
137 lines (127 loc) · 4.54 KB
/
build-rockchip-immortalWrt-24.10.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
name: build-rockchip-immortalWrt-24.10
on:
workflow_dispatch:
inputs:
profile:
type: choice
description: |
输入 软路由型号 可选值如下:
options:
- ariaboard_photonicat
- armsom_sige3
- armsom_sige7
- cyber_cyber3588-aib
- ezpro_mrkaio-m68s
- firefly_roc-rk3328-cc
- firefly_roc-rk3568-pc
- friendlyarm_nanopc-t4
- friendlyarm_nanopc-t6
- friendlyarm_nanopi-r2c
- friendlyarm_nanopi-r2c-plus
- friendlyarm_nanopi-r2s
- friendlyarm_nanopi-r3s
- friendlyarm_nanopi-r4s
- friendlyarm_nanopi-r4se
- friendlyarm_nanopi-r4s-enterprise
- friendlyarm_nanopi-r5c
- friendlyarm_nanopi-r5s
- friendlyarm_nanopi-r6c
- friendlyarm_nanopi-r6s
- huake_guangmiao-g4c
- lunzn_fastrhino-r66s
- lunzn_fastrhino-r68s
- lyt_t68m
- pine64_rock64
- pine64_rockpro64
- radxa_cm3_io
- radxa_e25
- radxa_rock-3a
- radxa_rock-3b
- radxa_rock-3c
- radxa_rock-5a
- radxa_rock-5b
- radxa_rock-pi-4a
- radxa_rock-pi-e
- radxa_rock-pi-s
- radxa_zero-3e
- radxa_zero-3w
- sinovoip_bpi-r2-pro
- xunlong_orangepi-5
- xunlong_orangepi-5-plus
- xunlong_orangepi-r1-plus
- xunlong_orangepi-r1-plus-lts
required: true
default: 'friendlyarm_nanopi-r3s'
rootfs_partsize:
description: '设置软件包大小 单位(MB)'
required: true
default: '1024'
enable_pppoe:
description: "是否配置PPPoE拨号信息?"
required: true
default: 'no'
type: choice
options:
- 'yes'
- 'no'
pppoe_account:
description: "宽带账号 (若启用PPPoE)"
required: false
pppoe_password:
description: "宽带密码 (若启用PPPoE)"
required: false
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set executable permissions
run: chmod +x ${{ github.workspace }}/rockchip/build.sh
- name: Validate PPPoE Inputs
run: |
if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then
if [[ -z "${{ inputs.pppoe_account }}" || -z "${{ inputs.pppoe_password }}" ]]; then
echo "Error: PPPoE account and password must be provided when PPPoE is enabled!"
exit 1
fi
fi
- name: Building Rockchip ImmortalWrt
run: |
profiles="${{ github.event.inputs.profile }}"
rootfs_partsize="${{ github.event.inputs.rootfs_partsize }}"
IFS=',' read -r -a profile_array <<< "$profiles"
for profile in "${profile_array[@]}"; do
echo "Building for profile: $profile"
docker run --rm -i \
--user root \
-v "${{ github.workspace }}/bin:/home/build/immortalwrt/bin" \
-v "${{ github.workspace }}/files:/home/build/immortalwrt/files" \
-v "${{ github.workspace }}/rockchip/imm.config:/home/build/immortalwrt/.config" \
-v "${{ github.workspace }}/rockchip/build.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$profile \
-e ROOTFS_PARTSIZE=$rootfs_partsize \
-e ENABLE_PPPOE=${{ inputs.enable_pppoe }} \
-e PPPOE_ACCOUNT=${{ inputs.pppoe_account }} \
-e PPPOE_PASSWORD=${{ inputs.pppoe_password }} \
immortalwrt/imagebuilder:rockchip-armv8-openwrt-24.10.0-rc3 /bin/bash /home/build/immortalwrt/build.sh
done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz ${{ github.workspace }}
for file in *.img.gz; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Upload ImmortWrt as release assets
uses: softprops/[email protected]
with:
tag_name: Autobuild
name: ImmortWrt-Rockchip
body_path: ${{ github.workspace }}/info.md
files: |
${{ github.workspace }}/*.img.gz
${{ github.workspace }}/*.sha256
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}