|
53 | 53 | - xunlong_orangepi-r1-plus-lts |
54 | 54 | required: true |
55 | 55 | 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" |
56 | 60 | rootfs_partsize: |
57 | 61 | description: '设置软件包大小 单位(MB)' |
58 | 62 | required: true |
@@ -97,6 +101,13 @@ jobs: |
97 | 101 | - name: Set executable permissions |
98 | 102 | run: chmod +x ${{ github.workspace }}/rockchip/build24.sh |
99 | 103 |
|
| 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 | + |
100 | 111 | - name: Validate PPPoE Inputs |
101 | 112 | run: | |
102 | 113 | if [[ "${{ inputs.enable_pppoe }}" == "yes" ]]; then |
@@ -144,13 +155,30 @@ jobs: |
144 | 155 | immortalwrt/imagebuilder:rockchip-armv8-openwrt-24.10.2 /bin/bash /home/build/immortalwrt/build.sh |
145 | 156 | done |
146 | 157 | |
| 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 |
147 | 175 |
|
148 | 176 | - name: Upload ImmortWrt as release assets |
149 | 177 | |
150 | 178 | with: |
151 | 179 | tag_name: Autobuild |
152 | 180 | name: ImmortWrt-Rockchip |
153 | | - body_path: ${{ github.workspace }}/info.md |
| 181 | + body_path: ${{ github.workspace }}/router-info.md |
154 | 182 | files: | |
155 | 183 | ${{ github.workspace }}/bin/targets/rockchip/armv8/*.img.gz |
156 | 184 | token: ${{ secrets.GITHUB_TOKEN }} |
|
0 commit comments