Skip to content

Commit 2e8adbc

Browse files
authored
Update openWrt-build.yml
1 parent 1e0bde1 commit 2e8adbc

1 file changed

Lines changed: 6 additions & 27 deletions

File tree

.github/workflows/openWrt-build.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,41 +36,20 @@ jobs:
3636
sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default
3737
./scripts/feeds update -a
3838
./scripts/feeds install -a
39-
chmod +x ../profiles/*.sh
40-
if [ -n "${{ inputs.target_profile }}" ]; then
41-
../profiles/${{ inputs.target_profile }}.sh
42-
fi
4339
4440
- name: 配置 OpenWrt(自动选择)
4541
run: |
4642
cd openwrt
4743
# 如果有指定的配置文件
4844
if [ -n "${{ inputs.target_profile }}.config" ] && [ -f "../profiles/${{ inputs.target_profile }}.config" ]; then
4945
cp "../profiles/${{ inputs.target_profile }}.config" .config
50-
echo "使用了自定义配置: ${{ inputs.target_profile }}"
51-
else
52-
# 自动选择一个常见设备
53-
echo "使用默认配置 (Newifi D2)"
54-
cat > .config << 'EOF'
55-
# 自动生成的默认配置
56-
CONFIG_TARGET_ramips=y
57-
CONFIG_TARGET_ramips_mt7621=y
58-
CONFIG_TARGET_ramips_mt7621_DEVICE_d-team_newifi-d2=y
59-
CONFIG_PACKAGE_luci=y
60-
CONFIG_PACKAGE_luci-ssl-openssl=y
61-
CONFIG_LUCI_LANG_zh-cn=y
62-
# 基础包
63-
CONFIG_PACKAGE_wpad-openssl=y
64-
CONFIG_PACKAGE_iptables-mod-extra=y
65-
CONFIG_PACKAGE_iptables-mod-tproxy=y
66-
# 文件系统支持
67-
CONFIG_PACKAGE_kmod-fs-ext4=y
68-
CONFIG_PACKAGE_kmod-fs-ntfs=y
69-
CONFIG_PACKAGE_kmod-usb-storage=y
70-
EOF
46+
echo "使用了自定义配置: ${{ inputs.target_profile }}.config"
47+
fi
48+
chmod +x ../profiles/*.sh
49+
if [ -n "${{ inputs.target_profile }}" ]; then
50+
echo "初始化配置: ${{ inputs.target_profile }}.sh"
51+
../profiles/${{ inputs.target_profile }}.sh
7152
fi
72-
73-
make defconfig
7453
7554
- name: 编译
7655
run: |

0 commit comments

Comments
 (0)