Skip to content

Commit 41f0921

Browse files
authored
Rockchip 软路由新增在工作流的UI上设置LAN IP功能
Rockchip 软路由新增在工作流的UI上设置LAN IP功能
2 parents 17b5a7a + b628e51 commit 41f0921

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

.github/workflows/build-rockchip-immortalWrt-23.05.4.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ on:
3737
description: '设置软件包大小 单位(MB)'
3838
required: true
3939
default: '1024'
40+
custom_router_ip:
41+
description: "请设置软路由的管理地址(注意仅对多网口软路由有效) 格式:192.168.x.1 或 10.x.x.1"
42+
required: true
43+
default: "192.168.100.1"
4044
enable_store:
4145
description: "集成 store 商店"
4246
required: false
@@ -76,6 +80,13 @@ jobs:
7680

7781
- name: Set executable permissions
7882
run: chmod +x ${{ github.workspace }}/rockchip/build23.sh
83+
84+
- name: Save Custom Router IP into OpenWrt files
85+
run: |
86+
mkdir -p "${{ github.workspace }}/custom"
87+
echo "${{ github.event.inputs.custom_router_ip }}" > "${{ github.workspace }}/custom/custom_router_ip.txt"
88+
echo "您设置的Rockchip软路由管理地址是:${{ github.event.inputs.custom_router_ip }}"
89+
# 后续步骤会将该文件映射到路由器/etc/config/custom_router_ip.txt 以便用于开机脚本99-custom.sh读取用户设置的ip
7990
8091
- name: Validate PPPoE Inputs
8192
run: |
@@ -123,13 +134,30 @@ jobs:
123134
immortalwrt/imagebuilder:rockchip-armv8-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
124135
done
125136
137+
- name: Create info
138+
run: |
139+
cat > ${{ github.workspace }}/router-info.md <<EOF
140+
## 📡 路由器后台信息
141+
142+
- ✳️ **软路由型号**: ${{ github.event.inputs.profile }}
143+
- 🏠 **后台地址**: ${{ github.event.inputs.custom_router_ip }}
144+
- 👤 **用户名**: root
145+
- 🔑 **密码**: 无
146+
EOF
147+
148+
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
149+
extra_content="#### 默认带docker"
150+
echo -e "\n$extra_content" >> ${{ github.workspace }}/router-info.md
151+
else
152+
echo -e "\n#### 不带docker" >> ${{ github.workspace }}/router-info.md
153+
fi
126154
127155
- name: Upload ImmortWrt as release assets
128156
uses: softprops/[email protected]
129157
with:
130158
tag_name: Autobuild-23.05.4
131159
name: ImmortWrt-Rockchip
132-
body_path: ${{ github.workspace }}/info.md
160+
body_path: ${{ github.workspace }}/router-info.md
133161
files: |
134162
${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz
135163
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build-rockchip-immortalWrt-24.10.2.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ on:
5353
- xunlong_orangepi-r1-plus-lts
5454
required: true
5555
default: 'friendlyarm_nanopi-r3s'
56+
custom_router_ip:
57+
description: "请设置软路由的管理地址(注意仅对多网口软路由有效) 格式:192.168.x.1 或 10.x.x.1"
58+
required: true
59+
default: "192.168.100.1"
5660
rootfs_partsize:
5761
description: '设置软件包大小 单位(MB)'
5862
required: true
@@ -97,6 +101,13 @@ jobs:
97101
- name: Set executable permissions
98102
run: chmod +x ${{ github.workspace }}/rockchip/build24.sh
99103

104+
- name: Save Custom Router IP into OpenWrt files
105+
run: |
106+
mkdir -p "${{ github.workspace }}/custom"
107+
echo "${{ github.event.inputs.custom_router_ip }}" > "${{ github.workspace }}/custom/custom_router_ip.txt"
108+
echo "您设置的Rockchip软路由管理地址是:${{ github.event.inputs.custom_router_ip }}"
109+
# 后续步骤会将该文件映射到路由器/etc/config/custom_router_ip.txt 以便用于开机脚本99-custom.sh读取用户设置的ip
110+
100111
- name: Validate PPPoE Inputs
101112
run: |
102113
if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then
@@ -144,13 +155,30 @@ jobs:
144155
immortalwrt/imagebuilder:rockchip-armv8-openwrt-24.10.2 /bin/bash /home/build/immortalwrt/build.sh
145156
done
146157
158+
- name: Create info
159+
run: |
160+
cat > ${{ github.workspace }}/router-info.md <<EOF
161+
## 📡 路由器后台信息
162+
163+
- ✳️ **软路由型号**: ${{ github.event.inputs.profile }}
164+
- 🏠 **后台地址**: ${{ github.event.inputs.custom_router_ip }}
165+
- 👤 **用户名**: root
166+
- 🔑 **密码**: 无
167+
EOF
168+
169+
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
170+
extra_content="#### 默认带docker"
171+
echo -e "\n$extra_content" >> ${{ github.workspace }}/router-info.md
172+
else
173+
echo -e "\n#### 不带docker" >> ${{ github.workspace }}/router-info.md
174+
fi
147175
148176
- name: Upload ImmortWrt as release assets
149177
uses: softprops/[email protected]
150178
with:
151179
tag_name: Autobuild
152180
name: ImmortWrt-Rockchip
153-
body_path: ${{ github.workspace }}/info.md
181+
body_path: ${{ github.workspace }}/router-info.md
154182
files: |
155183
${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz
156184
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)