教程类文章具有时效性,看清楚发布日期,超过一定日子文章内容可能失效,仅仅作为参考。
点击Use this template
按钮,创建repo
。然后给该repo
启用Actions
功能。
项目GitHub
地址:
https://github.com/P3TERX/Actions-OpenWrt
编辑diy-part1.sh
文件,可以更改固件是XXRPlus
还是Passwall
,想用什么就给倒数两行其中一行取消注释就生效。
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part1.sh
# Description: OpenWrt DIY script part 1 (Before Update feeds)
#
# Uncomment a feed source
#sed -i 's/^#\(.*helloworld\)/\1/' feeds.conf.default
# Add a feed source
#echo 'src-git helloworld https://github.com/fw876/helloworld' >>feeds.conf.default
#echo 'src-git passwall https://github.com/xiaorouji/openwrt-passwall' >>feeds.conf.default
编辑diy-part2.sh
文件,修改最后一行可以更改固件默认后台地址。这个无关紧要反正在shell里面也可以通过vi etc/config/network
命令更改。
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# Modify default IP
#sed -i 's/192.168.1.1/192.168.50.5/g' package/base-files/files/bin/config_generate
然后进入actions
,选Build OpenWrt
任务,单击Run workflow
,可以选择分支和是否启用SSH
,默认是false
,改成true
就可以使用SSH
功能,最后运行即可。
希望本文可以帮到你