├── .config ├── .github └── workflows │ └── openwrt.yml └── README.md /.github/workflows/openwrt.yml: -------------------------------------------------------------------------------- 1 | # 2 | # This is free software, lisence use MIT. 3 | # 4 | # Copyright (C) 2019 P3TERX 5 | # Copyright (C) 2020 KFERMercer 6 | # 7 | # 8 | # 9 | 10 | name: OpenWrt 11 | 12 | on: 13 | push: 14 | branches: 15 | - master 16 | schedule: 17 | - cron: 0 0 1 * * 18 | watch: 19 | types: started 20 | 21 | jobs: 22 | build: 23 | runs-on: ubuntu-latest 24 | if: github.event.repository.owner.id == github.event.sender.id 25 | 26 | steps: 27 | - name: Checkout 28 | uses: actions/checkout@master 29 | 30 | - name: Initialization environment 31 | env: 32 | DEBIAN_FRONTEND: noninteractive 33 | run: | 34 | sudo -E apt-get -yqq update 35 | sudo -E apt-get -yqq install build-essential asciidoc binutils bzip2 lib32gcc-s1 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib 36 | sudo -E apt-get -y autoremove --purge 37 | sudo -E apt-get clean 38 | - name: Download lede 39 | run: | 40 | git clone https://github.com/coolsnowwolf/lede 41 | cp .config ./lede/.config 42 | mv ./lede/* ./ 43 | - name: Install Helloword 44 | run: | 45 | echo "src-git helloworld https://github.com/fw876/helloworld" >> ./feeds.conf.default 46 | - name: Install OpenClash 47 | run: | 48 | mkdir package/luci-app-openclash 49 | cd package/luci-app-openclash 50 | git init 51 | git remote add -f origin https://github.com/vernesong/OpenClash.git 52 | git config core.sparsecheckout true 53 | echo "luci-app-openclash" >> .git/info/sparse-checkout 54 | git pull --depth 1 origin master 55 | git branch --set-upstream-to=origin/master master 56 | pushd luci-app-openclash/tools/po2lmo 57 | make && sudo make install 58 | popd 59 | - name: Update feeds 60 | run: | 61 | ./scripts/feeds update -a 62 | ./scripts/feeds install -a 63 | - name: Costom configure file 64 | run: | 65 | make defconfig 66 | - name: Download package source code 67 | run: | 68 | make download -j8 69 | find dl -size -1024c -exec ls -l {} \; 70 | find dl -size -1024c -exec rm -f {} \; 71 | - name: Compile firmware 72 | run: | 73 | echo -e "$(nproc) thread build." 74 | make -j$(nproc) V=s 75 | - name : Upload artifact 76 | uses: actions/upload-artifact@master 77 | with: 78 | name: OpenWrt_firmware 79 | path: bin/targets/ 80 | 81 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenWrt云编译 2 | 3 | #### 每天凌晨2点自动编译 4 | #### 大雕仓库 https://github.com/coolsnowwolf/lede 5 | 6 | ### 把本仓库克隆到自己的仓库里 7 | #### 打开下面链接生成.config配置文件 8 | #### [https://hackyes.github.io/openwrt-menuconfig/index.html](https://hackyes.github.io/openwrt-menuconfig/index.html) 9 | 10 | #### 编辑 .config 文件,把内容清空替换成上面链接生成的配置内容 11 | 12 | ### 点这右上角 ✰Star 变成 ★Unstar 即可开始编译 13 | 14 | ### 等待编译成功后,到Actions里下载固件即可 15 | --------------------------------------------------------------------------------