GithubHelp home page GithubHelp logo

huazhuangnan / actions-build-padavan-openwrt Goto Github PK

View Code? Open in Web Editor NEW
279.0 9.0 325.0 635 KB

GitHub Action 学习实例 - 自动编译 padavan 和 openWrt

License: MIT License

Shell 27.15% Classic ASP 14.90% C 57.96%
actions openwrt padavan github-actions actions-openwrt actions-padavan openclash adguardhome padavan-openwrt lienol

actions-build-padavan-openwrt's Introduction

GitHub Action 学习实例 - 自动编译 padavan 和 openWrt

前言

  • 目前本人手上只有这几个设备,所以只测试这几个

    • PSG1218(k2,超频 600,按我的参数编译 16-22 分钟,~7.07mb)
    • NEWIFI3(新三,按我的参数编译大概 28-35 分钟,~25.5mb,集成了 v2 二进制文件和 frp 所以大)
    • G-DOCK(竞斗云 2.0,按我的参数编译大概 3 小时 30 分钟,~57mb(ubi 包)。
    • 编译好的固件最好双清或者 breed,opboot,uboot,清除后刷入,防止修改了配置残余
    • 有关参数看设备的配置文件、sh文件、padavan或者openwrt对应 public.sh 文件
  • 固件按理通用编译,但是还需测试,目前测试了的有,coolsnowwolf(雕大)的 openwrt(还集成了 Lienol 的包和 openclash,在 public.sh 里面),chongshengB(C 大)的 padavan

  • 特别说明,如果不需要编译某个固件删除相应的 yml 文件即可,添加请仔细阅读有关固件的文档

  • 如果有啥问题欢迎提交 Lssues 反馈或者 TG:https://t.me/huazhuangnan邮箱:[email protected]

  • 历史自编译网盘地址:https://pan.baidu.com/s/10_4qsIDBsLracQb_4QK6Gg;提取码:r6ie

  • 恩山: https://www.right.com.cn/forum/?567122

  • B 站(有视频): https://space.bilibili.com/436465779

  • 整理编写不易,喜欢的话右上角给个 star

下载编译完成固件

更新日志

本地编译

git clone https://github.com/HuaZhuangNan/actions-build-padavan-openwrt.git --depth=1 # 下载
cd actions-build-padavan-openwrt/scripts  # 进入目录        
chmod +x ./*.sh                       # 添加编译sh执行权限
./padavan.sh PSG1218 -s -p -l -o ./   # 编译 PSG1218 详细日志 开启代理 修改登录页

github 编译方法

  • 注:所有固件都是下载的,所以需要编译其他版本的yml去改连接和编译的配置就好
  • Fork 到自己仓库后(按需修改配置文件)
  • 需要哪种方式编译,打开 yml 文件里面的注释就好(就是删除#号)
  • 文件打包完会在 action 的任务里面

监听文件 push 编译(默认编译,需要其他方式,打开注释修改或自己添加就好)

  • 选择按log文件默认的原因

    1. 方便查看管理
    2. 防止多次的push多次编译
    3. 防止不是自己点击 star 之后 Actions 还是会有显示
  • 编译模板 yml 里面也有例子

push:                     # push 操作
  branches:               # 分支
    - master              # 主分支
  # paths:                # 路径
  #   - padavan/*         # 监听padavan目录下所有文件的push操作
  paths:                  # 路径
    - logs/k2.md          # 监听logs目录下 k2.md 的push操作 (默认)

星标 star 编译

  • yml文件打开注释点击 star (星标开始全部编译);依赖这句判断是仓库持有者点击:github.event.repository.owner.id == github.event.sender.id
watch:                     # 监视操作
    types: started         # 点击 star 之后,可以写数组形式,具体可以参考官方文档

定时 schedule 编译

  • 定时编译方法 GitHub 官方文档
  • 编译模板 yml 文件中有个每天北京时间凌晨 3 点编译的例子
schedule:                 # 时间表
  - cron: "0 19 * * *"    # 每天国际时间 19 点,北京时间 3 点执行(北京+8)

目录说明

  |-- .editorconfig     # 编辑规范
  |-- .github           # GitHub 工作目录
  |   |-- workfloms     # 存放 Action 的 YML文件
  |-- openwrt           # openwrt 有关
  |   |-- backups       # openwrt 文件备份 以及 openwrt 编译模板
  |   |-- public.sh     # 公共的修改执行文件
  |-- padavan           # padavan 有关
  |   |-- backups       # padanvan文件备份 以及 padavan 编译模板
  |   |-- public.sh     # 公共的修改执行文件
  |-- screenshots       # 效果目录
  |-- logs              # 更新日志目录
  |-- scripts           # 脚本目录

Action 常用参数说明

  • name 自动构建的名字

  • on 触发条件

    • schedule: # 时间表
      • cron: '0 19 * * *' # 每天国际时间 19 点,北京时间凌晨 3 点执行(北京+8)
    • watch # 监视
      • type: started # 类型:点击了星标
  • env 环境变量

  • jobs 任务

  • build 工作的 id

  • run-on 工作运行的环境平台

  • if 工作运行的判断

  • steps 包含一系列任务步骤

    • name 子任务名
    • user 使用官方的一些库完成一些操作
    • run 运行脚本
    • id 运行 id

参考项目或文章

License

MIT © HuaZhuangNan(花妆男)

actions-build-padavan-openwrt's People

Contributors

huazhuangnan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actions-build-padavan-openwrt's Issues

新编译的固件无法登陆后台

看编译日志, 修改用户名密码的脚本似乎并没有报错
编译日志

DHCP得到的网段也不是脚本设置的192.168.3, 而是192.168.11
试过了admin/admin, root/password, root/admin等常用组合都不对

请解惑

Issue can be deleted

I edited this issue to remove cryptocurrency adspam. My account was used by a bad actor because of a leaked access token. This bad actor created lots of issues with cryptocurrency adspam. I am sorry. Sadly I can only update issues, not delete them.

Issue can be deleted

I edited this issue to remove cryptocurrency adspam. My account was used by a bad actor because of a leaked access token. This bad actor created lots of issues with cryptocurrency adspam. I am sorry. Sadly I can only update issues, not delete them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.