Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mgqnfoqv7k2w
AutoBuildImmortalWrt
Commits
802727af
Unverified
Commit
802727af
authored
Jan 01, 2025
by
wukongdaily
Committed by
GitHub
Jan 01, 2025
Browse files
新增MT3000/2500/6000的工作流
parent
1e3c6f6a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
141 additions
and
6 deletions
+141
-6
.github/build-glinet-23.05.4.yml
.github/build-glinet-23.05.4.yml
+84
-0
files/etc/uci-defaults/glinet/custom.sh
files/etc/uci-defaults/glinet/custom.sh
+41
-0
mediatek-filogic/build.sh
mediatek-filogic/build.sh
+13
-6
mediatek-filogic/info.md
mediatek-filogic/info.md
+3
-0
No files found.
.github/build-glinet-23.05.4.yml
0 → 100644
View file @
802727af
name
:
build-gl-inet-23.05.4 ImmpotalWrt
on
:
workflow_dispatch
:
inputs
:
profile
:
type
:
choice
description
:
"
请选择路由器型号"
required
:
true
options
:
-
glinet_gl-mt3000
-
glinet_gl-mt2500
-
glinet_gl-mt6000
default
:
glinet_gl-mt3000
include_docker
:
description
:
|
是否编译 Docker 插件
required
:
true
default
:
'
no'
type
:
choice
options
:
-
'
yes'
-
'
no'
jobs
:
build
:
runs-on
:
ubuntu-22.04
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v3
-
name
:
Set executable permissions
run
:
|
chmod +x ${{ github.workspace }}/mediatek-filogic/build.sh
-
name
:
Build Gl-iNet ImmpotalWrt 23.05.4
run
:
|
profiles="${{ github.event.inputs.profile }}"
include_docker="${{ github.event.inputs.include_docker }}"
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/etc/uci-defaults/glinet:/home/build/immortalwrt/files/etc/uci-defaults" \
-v "${{ github.workspace }}/mediatek-filogic/build.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$profile \
-e INCLUDE_DOCKER=$include_docker \
immortalwrt/imagebuilder:mediatek-filogic-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done
-
name
:
Create info
run
:
|
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
extra_content="### 默认带docker"
echo -e "\n $extra_content" >> ${{ github.workspace }}/mediatek-filogic/info.md
else
echo -e "NO docker"
fi
-
name
:
Create GitHub Release Info
uses
:
softprops/action-gh-release@v2.1.0
with
:
tag_name
:
Autobuild-GL-iNet
name
:
ImmortalWrt-GL-iNet
body_path
:
${{ github.workspace }}/mediatek-filogic/info.md
draft
:
false
prerelease
:
false
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Upload ImmortWrt as release assets
uses
:
softprops/action-gh-release@v2.1.0
with
:
tag_name
:
Autobuild-GL-iNet
files
:
${{ github.workspace }}/bin/targets/mediatek/filogic/*.bin
token
:
${{ secrets.GITHUB_TOKEN }}
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
files/etc/uci-defaults/glinet/custom.sh
0 → 100644
View file @
802727af
#!/bin/sh
# 设置默认防火墙规则,方便虚拟机首次访问 WebUI
uci
set
firewall.@zone[1].input
=
'ACCEPT'
# 设置主机名映射,解决安卓原生 TV 无法联网的问题
uci add dhcp domain
uci
set
"dhcp.@domain[-1].name=time.android.com"
uci
set
"dhcp.@domain[-1].ip=203.107.6.88"
# 根据网卡数量配置网络
count
=
0
for
iface
in
/sys/class/net/
*
;
do
iface_name
=
$(
basename
"
$iface
"
)
# 检查是否为物理网卡(排除回环设备和无线设备)
if
[
-e
"
$iface
/device"
]
&&
echo
"
$iface_name
"
|
grep
-Eq
'^eth|^en'
;
then
count
=
$((
count
+
1
))
fi
done
# 网络设置
if
[
"
$count
"
-eq
1
]
;
then
uci
set
network.lan.proto
=
'dhcp'
elif
[
"
$count
"
-gt
1
]
;
then
uci
set
network.lan.ipaddr
=
'192.168.8.1'
fi
# 设置所有网口可访问网页终端
uci delete ttyd.@ttyd[0].interface
# 设置所有网口可连接 SSH
uci
set
dropbear.@dropbear[0].Interface
=
''
uci commit
# 设置编译作者信息
FILE_PATH
=
"/etc/openwrt_release"
NEW_DESCRIPTION
=
"Compiled by wukongdaily"
sed
-i
"s/DISTRIB_DESCRIPTION='[^']*'/DISTRIB_DESCRIPTION='
$NEW_DESCRIPTION
'/"
"
$FILE_PATH
"
exit
0
mediatek-filogic/build.sh
View file @
802727af
#!/bin/bash
# yml 传入的路由器型号 PROFILE
echo
"Building for profile:
$PROFILE
"
echo
"Include Docker:
$INCLUDE_DOCKER
"
# 输出调试信息
echo
"
$(
date
'+%Y-%m-%d %H:%M:%S'
)
- Starting build process..."
...
...
@@ -13,16 +14,22 @@ PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-filebrowser-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-app-argon-config"
PACKAGES
=
"
$PACKAGES
luci-i18n-argon-config-zh-cn"
#24.10
#PACKAGES="$PACKAGES luci-i18n-package-manager-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-diskman-zh-cn"
#23.05
PACKAGES
=
"
$PACKAGES
luci-i18n-opkg-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-ttyd-zh-cn"
#
PACKAGES="$PACKAGES luci-i18n-passwall-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-passwall-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-app-openclash"
#
PACKAGES="$PACKAGES luci-i18n-homeproxy-zh-cn"
PACKAGES
=
"
$PACKAGES
luci-i18n-homeproxy-zh-cn"
PACKAGES
=
"
$PACKAGES
openssh-sftp-server"
#PACKAGES="$PACKAGES luci-i18n-dockerman-zh-cn"
# 判断是否需要编译 Docker 插件
if
[
"
$INCLUDE_DOCKER
"
=
"yes"
]
;
then
PACKAGES
=
"
$PACKAGES
luci-i18n-dockerman-zh-cn"
echo
"Adding package: luci-i18n-dockerman-zh-cn"
fi
# 构建镜像
echo
"
$(
date
'+%Y-%m-%d %H:%M:%S'
)
- Building image with the following packages:"
...
...
@@ -35,4 +42,4 @@ if [ $? -ne 0 ]; then
exit
1
fi
echo
"
$(
date
'+%Y-%m-%d %H:%M:%S'
)
- Build completed successfully."
echo
"
$(
date
'+%Y-%m-%d %H:%M:%S'
)
- Build completed successfully."
\ No newline at end of file
mediatek-filogic/info.md
0 → 100644
View file @
802727af
[

](https://wkdaily.cpolar.top/archives/1)
#### 固件地址 `192.168.100.1`
#### 用户名 `root` 密码:无
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment