Repository navigation
169 lines (153 loc) · 5.84 KB
/
Copy pathbuild-iso-25.12.x.yml
File metadata and controls
169 lines (153 loc) · 5.84 KB
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
161
162
163
164
165
166
167
168
169
# 此工作流是为了构建一个immortalwrt固件的安装器 格式为iso 可用于所有的虚拟机 和 物理机
# 所谓安装器就是用来安装用的 iso引导的是一个启动速度极快的debian live系统 跑码后输入命令 ddd 即可调出安装菜单
# 安装时 若是多张硬盘 你可以选择 需要安装的硬盘 此类方法安装的openwrt 安装后是有剩余空间的 更多信息请参考 wukongdaily/img-installer 项目
# 几乎所有linux 都有各自的安装器 唯独openwrt和armbian 没有, 希望此工作流 弥补这个遗憾 让你更优雅的 安装openwrt
name: Build 25.12.x ISO x86-64
on:
workflow_dispatch:
inputs:
luci_version:
description: "选择luci版本"
required: false
default: "25.12.1"
type: choice
options:
- 25.12.0
- 25.12.1
- 25.12.2
profile:
description: '选择软件包空间大小'
required: true
type: choice
default: '1G'
options:
- '1G'
- '2G'
- '3G'
- '4G'
enable_store:
description: "集成 store 商店"
required: false
type: boolean
default: false
include_docker:
description: "是否编译 Docker 插件"
required: true
default: 'yes'
type: choice
options:
- 'yes'
- 'no'
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
permissions:
contents: write
jobs:
build_immortalwrt:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set executable permissions
run: chmod +x ${{ github.workspace }}/x86-64/build25.sh
- name: Validate PPPoE Inputs
run: |
if [[ "${{ github.event.inputs.enable_pppoe }}" == "yes" ]]; then
if [[ -z "${{ github.event.inputs.pppoe_account }}" || -z "${{ github.event.inputs.pppoe_password }}" ]]; then
echo "Error: PPPoE account and password must be provided when PPPoE is enabled!"
exit 1
fi
fi
- name: Enable Store integration
run: |
if [ "${{ github.event.inputs.enable_store }}" == "true" ]; then
echo 'CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-store"' >> shell/apk-custom-packages.sh
echo "✅ 已追加 luci-app-store"
else
echo "❎ 未启用 luci-app-store"
fi
- name: ✅ 正在构建ImmortalWrt固件25.12.x
run: |
profile="${{ github.event.inputs.profile }}"
case "$profile" in
1G)
ROOTFS_SIZE=1024
;;
2G)
ROOTFS_SIZE=2048
;;
3G)
ROOTFS_SIZE=3072
;;
4G)
ROOTFS_SIZE=4096
;;
esac
echo "ROOTFS_SIZE=$ROOTFS_SIZE" >> $GITHUB_ENV
include_docker="${{ github.event.inputs.include_docker }}"
luci_version="${{ github.event.inputs.luci_version }}"
echo "Building for rootfs_size: $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 }}/custom:/home/build/immortalwrt/files/etc/config" \
-v "${{ github.workspace }}/x86-64/imm25.config:/home/build/immortalwrt/.config" \
-v "${{ github.workspace }}/shell:/home/build/immortalwrt/shell" \
-v "${{ github.workspace }}/x86-64/build25.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$ROOTFS_SIZE \
-e INCLUDE_DOCKER=$include_docker \
-e ENABLE_PPPOE=${{ inputs.enable_pppoe }} \
-e PPPOE_ACCOUNT=${{ inputs.pppoe_account }} \
-e PPPOE_PASSWORD=${{ inputs.pppoe_password }} \
immortalwrt/imagebuilder:x86-64-openwrt-${luci_version} /bin/bash /home/build/immortalwrt/build.sh
- name: ✅ 复制固件到根目录
run: |
cp ${{ github.workspace }}/bin/targets/x86/64/*squashfs-combined-efi.img.gz ${{ github.workspace }}
- name: ✅ 上传固件到 artifact (for ISO generation)
uses: actions/upload-artifact@v6
with:
name: firmware-img
path: |
*.img.gz
build_installer_iso:
runs-on: ubuntu-22.04
needs: build_immortalwrt
steps:
- name: Download firmware artifact
uses: actions/download-artifact@v7
with:
name: firmware-img
- name: ⏬ 同步 img-installer 项目 准备制作ISO
run: |
git clone https://github.com/wukongdaily/img-installer.git
cd img-installer
- name: Set executable permissions for scripts
run: |
chmod +x "${{ github.workspace }}/img-installer/custom.sh"
chmod +x "${{ github.workspace }}/img-installer/supportFiles/custom/build.sh"
- name: ✅ 制作 25.12.x ISO
run: |
firmware_file=$(ls *squashfs-combined-efi.img.gz)
cd img-installer
bash autobuild/autobuild.sh "../$firmware_file"
- name: 🚀 上传 ISO 到 Release
uses: softprops/action-gh-release@v3
with:
tag_name: "Custom-Installer-x86_64-ISO"
body_path: "${{ github.workspace }}/img-installer/autobuild/info.md"
files: |
img-installer/output/custom-installer-x86_64.iso
token: "${{ secrets.GITHUB_TOKEN }}"