├── .github └── workflows │ ├── Lean 4B.yml │ ├── Lean k2p.yml │ └── Lean x64.yml ├── LICENSE ├── README.md ├── config ├── 4B.config ├── k2p.config └── x64.config ├── diy-part1.sh └── diy-part2.sh /.github/workflows/Lean 4B.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2020 P3TERX 3 | # 4 | # This is free software, licensed under the MIT License. 5 | # See /LICENSE for more information. 6 | # 7 | # https://github.com/P3TERX/Actions-OpenWrt 8 | # Description: Build OpenWrt using GitHub Actions 9 | # 10 | 11 | name: Lean 4B 12 | 13 | on: 14 | workflow_dispatch: 15 | inputs: 16 | ssh: 17 | description: 'SSH connection to Actions' 18 | required: false 19 | default: 'false' 20 | 21 | env: 22 | REPO_URL: https://github.com/coolsnowwolf/lede 23 | REPO_BRANCH: master 24 | FEEDS_CONF: feeds.conf.default 25 | CONFIG_FILE: config/4B.config 26 | DIY_P1_SH: diy-part1.sh 27 | DIY_P2_SH: diy-part2.sh 28 | UPLOAD_BIN_DIR: false 29 | UPLOAD_FIRMWARE: true 30 | UPLOAD_COWTRANSFER: false 31 | UPLOAD_WETRANSFER: false 32 | UPLOAD_RELEASE: true 33 | TZ: Asia/Shanghai 34 | 35 | jobs: 36 | build: 37 | runs-on: ubuntu-20.04 38 | 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@main 42 | 43 | - name: Initialization environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 48 | sudo -E apt-get -qq update 49 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-2004) 50 | sudo -E apt-get -qq autoremove --purge 51 | sudo -E apt-get -qq clean 52 | sudo timedatectl set-timezone "$TZ" 53 | sudo mkdir -p /workdir 54 | sudo chown $USER:$GROUPS /workdir 55 | 56 | - name: Clone source code 57 | working-directory: /workdir 58 | run: | 59 | df -hT $PWD 60 | git clone $REPO_URL -b $REPO_BRANCH openwrt 61 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 62 | 63 | - name: Load custom feeds 64 | run: | 65 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 66 | chmod +x $DIY_P1_SH 67 | cd openwrt 68 | $GITHUB_WORKSPACE/$DIY_P1_SH 69 | 70 | - name: Update feeds 71 | run: cd openwrt && ./scripts/feeds update -a 72 | 73 | - name: Install feeds 74 | run: cd openwrt && ./scripts/feeds install -a 75 | 76 | - name: Load custom configuration 77 | run: | 78 | [ -e files ] && mv files openwrt/files 79 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 80 | chmod +x $DIY_P2_SH 81 | cd openwrt 82 | $GITHUB_WORKSPACE/$DIY_P2_SH 83 | 84 | - name: SSH connection to Actions 85 | uses: P3TERX/ssh2actions@v1.0.0 86 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') 87 | env: 88 | TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} 89 | TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} 90 | 91 | - name: Download package 92 | id: package 93 | run: | 94 | cd openwrt 95 | make defconfig 96 | make download -j8 97 | find dl -size -1024c -exec ls -l {} \; 98 | find dl -size -1024c -exec rm -f {} \; 99 | 100 | - name: Compile the firmware 101 | id: compile 102 | run: | 103 | cd openwrt 104 | echo -e "$(nproc) thread compile" 105 | make -j$(nproc) || make -j1 || make -j1 V=s 106 | echo "::set-output name=status::success" 107 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 108 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 109 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 110 | 111 | - name: Check space usage 112 | if: (!cancelled()) 113 | run: df -hT 114 | 115 | - name: Upload bin directory 116 | uses: actions/upload-artifact@main 117 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 118 | with: 119 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 120 | path: openwrt/bin 121 | 122 | - name: Organize files 123 | id: organize 124 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 125 | run: | 126 | cd openwrt/bin/targets/*/* 127 | rm -rf packages 128 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 129 | echo "::set-output name=status::success" 130 | 131 | - name: Upload firmware directory 132 | uses: actions/upload-artifact@main 133 | if: steps.organize.outputs.status == 'success' && !cancelled() 134 | with: 135 | name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 136 | path: ${{ env.FIRMWARE }} 137 | 138 | - name: Upload firmware to cowtransfer 139 | id: cowtransfer 140 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 141 | run: | 142 | curl -fsSL git.io/file-transfer | sh 143 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 144 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 145 | echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")" 146 | 147 | - name: Upload firmware to WeTransfer 148 | id: wetransfer 149 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 150 | run: | 151 | curl -fsSL git.io/file-transfer | sh 152 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 153 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 154 | echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")" 155 | 156 | - name: Generate release tag 157 | id: tag 158 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 159 | run: | 160 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")" 161 | touch release.txt 162 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 163 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 164 | echo "::set-output name=status::success" 165 | 166 | - name: Upload firmware to release 167 | uses: softprops/action-gh-release@v1 168 | if: steps.tag.outputs.status == 'success' && !cancelled() 169 | env: 170 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 171 | with: 172 | tag_name: ${{ steps.tag.outputs.release_tag }} 173 | body_path: release.txt 174 | files: ${{ env.FIRMWARE }}/* 175 | 176 | - name: Delete workflow runs 177 | uses: GitRML/delete-workflow-runs@main 178 | with: 179 | retain_days: 1 180 | keep_minimum_runs: 3 181 | 182 | - name: Remove old Releases 183 | uses: dev-drprasad/delete-older-releases@v0.1.0 184 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 185 | with: 186 | keep_latest: 3 187 | delete_tags: true 188 | env: 189 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 190 | -------------------------------------------------------------------------------- /.github/workflows/Lean k2p.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2020 P3TERX 3 | # 4 | # This is free software, licensed under the MIT License. 5 | # See /LICENSE for more information. 6 | # 7 | # https://github.com/P3TERX/Actions-OpenWrt 8 | # Description: Build OpenWrt using GitHub Actions 9 | # 10 | 11 | name: Lean k2p 12 | 13 | on: 14 | workflow_dispatch: 15 | inputs: 16 | ssh: 17 | description: 'SSH connection to Actions' 18 | required: false 19 | default: 'false' 20 | 21 | env: 22 | REPO_URL: https://github.com/coolsnowwolf/lede 23 | REPO_BRANCH: master 24 | FEEDS_CONF: feeds.conf.default 25 | CONFIG_FILE: config/k2p.config 26 | DIY_P1_SH: diy-part1.sh 27 | DIY_P2_SH: diy-part2.sh 28 | UPLOAD_BIN_DIR: false 29 | UPLOAD_FIRMWARE: true 30 | UPLOAD_COWTRANSFER: false 31 | UPLOAD_WETRANSFER: false 32 | UPLOAD_RELEASE: true 33 | TZ: Asia/Shanghai 34 | 35 | jobs: 36 | build: 37 | runs-on: ubuntu-20.04 38 | 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@main 42 | 43 | - name: Initialization environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 48 | sudo -E apt-get -qq update 49 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-2004) 50 | sudo -E apt-get -qq autoremove --purge 51 | sudo -E apt-get -qq clean 52 | sudo timedatectl set-timezone "$TZ" 53 | sudo mkdir -p /workdir 54 | sudo chown $USER:$GROUPS /workdir 55 | 56 | - name: Clone source code 57 | working-directory: /workdir 58 | run: | 59 | df -hT $PWD 60 | git clone $REPO_URL -b $REPO_BRANCH openwrt 61 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 62 | 63 | - name: Load custom feeds 64 | run: | 65 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 66 | chmod +x $DIY_P1_SH 67 | cd openwrt 68 | $GITHUB_WORKSPACE/$DIY_P1_SH 69 | 70 | - name: Update feeds 71 | run: cd openwrt && ./scripts/feeds update -a 72 | 73 | - name: Install feeds 74 | run: cd openwrt && ./scripts/feeds install -a 75 | 76 | - name: Load custom configuration 77 | run: | 78 | [ -e files ] && mv files openwrt/files 79 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 80 | chmod +x $DIY_P2_SH 81 | cd openwrt 82 | $GITHUB_WORKSPACE/$DIY_P2_SH 83 | 84 | - name: SSH connection to Actions 85 | uses: P3TERX/ssh2actions@v1.0.0 86 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') 87 | env: 88 | TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} 89 | TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} 90 | 91 | - name: Download package 92 | id: package 93 | run: | 94 | cd openwrt 95 | make defconfig 96 | make download -j8 97 | find dl -size -1024c -exec ls -l {} \; 98 | find dl -size -1024c -exec rm -f {} \; 99 | 100 | - name: Compile the firmware 101 | id: compile 102 | run: | 103 | cd openwrt 104 | echo -e "$(nproc) thread compile" 105 | make -j$(nproc) || make -j1 || make -j1 V=s 106 | echo "::set-output name=status::success" 107 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 108 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 109 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 110 | 111 | - name: Check space usage 112 | if: (!cancelled()) 113 | run: df -hT 114 | 115 | - name: Upload bin directory 116 | uses: actions/upload-artifact@main 117 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 118 | with: 119 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 120 | path: openwrt/bin 121 | 122 | - name: Organize files 123 | id: organize 124 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 125 | run: | 126 | cd openwrt/bin/targets/*/* 127 | rm -rf packages 128 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 129 | echo "::set-output name=status::success" 130 | 131 | - name: Upload firmware directory 132 | uses: actions/upload-artifact@main 133 | if: steps.organize.outputs.status == 'success' && !cancelled() 134 | with: 135 | name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 136 | path: ${{ env.FIRMWARE }} 137 | 138 | - name: Upload firmware to cowtransfer 139 | id: cowtransfer 140 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 141 | run: | 142 | curl -fsSL git.io/file-transfer | sh 143 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 144 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 145 | echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")" 146 | 147 | - name: Upload firmware to WeTransfer 148 | id: wetransfer 149 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 150 | run: | 151 | curl -fsSL git.io/file-transfer | sh 152 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 153 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 154 | echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")" 155 | 156 | - name: Generate release tag 157 | id: tag 158 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 159 | run: | 160 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")" 161 | touch release.txt 162 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 163 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 164 | echo "::set-output name=status::success" 165 | 166 | - name: Upload firmware to release 167 | uses: softprops/action-gh-release@v1 168 | if: steps.tag.outputs.status == 'success' && !cancelled() 169 | env: 170 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 171 | with: 172 | tag_name: ${{ steps.tag.outputs.release_tag }} 173 | body_path: release.txt 174 | files: ${{ env.FIRMWARE }}/* 175 | 176 | - name: Delete workflow runs 177 | uses: GitRML/delete-workflow-runs@main 178 | with: 179 | retain_days: 1 180 | keep_minimum_runs: 3 181 | 182 | - name: Remove old Releases 183 | uses: dev-drprasad/delete-older-releases@v0.1.0 184 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 185 | with: 186 | keep_latest: 3 187 | delete_tags: true 188 | env: 189 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 190 | -------------------------------------------------------------------------------- /.github/workflows/Lean x64.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2020 P3TERX 3 | # 4 | # This is free software, licensed under the MIT License. 5 | # See /LICENSE for more information. 6 | # 7 | # https://github.com/P3TERX/Actions-OpenWrt 8 | # Description: Build OpenWrt using GitHub Actions 9 | # 10 | 11 | name: Lean x64 12 | 13 | on: 14 | workflow_dispatch: 15 | inputs: 16 | ssh: 17 | description: 'SSH connection to Actions' 18 | required: false 19 | default: 'false' 20 | 21 | env: 22 | REPO_URL: https://github.com/coolsnowwolf/lede 23 | REPO_BRANCH: master 24 | FEEDS_CONF: feeds.conf.default 25 | CONFIG_FILE: config/x64.config 26 | DIY_P1_SH: diy-part1.sh 27 | DIY_P2_SH: diy-part2.sh 28 | UPLOAD_BIN_DIR: false 29 | UPLOAD_FIRMWARE: true 30 | UPLOAD_COWTRANSFER: false 31 | UPLOAD_WETRANSFER: false 32 | UPLOAD_RELEASE: false 33 | TZ: Asia/Shanghai 34 | 35 | jobs: 36 | build: 37 | runs-on: ubuntu-20.04 38 | 39 | steps: 40 | - name: Checkout 41 | uses: actions/checkout@main 42 | 43 | - name: Initialization environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 48 | sudo -E apt-get -qq update 49 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-2004) 50 | sudo -E apt-get -qq autoremove --purge 51 | sudo -E apt-get -qq clean 52 | sudo timedatectl set-timezone "$TZ" 53 | sudo mkdir -p /workdir 54 | sudo chown $USER:$GROUPS /workdir 55 | 56 | - name: Clone source code 57 | working-directory: /workdir 58 | run: | 59 | df -hT $PWD 60 | git clone $REPO_URL -b $REPO_BRANCH openwrt 61 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 62 | 63 | - name: Load custom feeds 64 | run: | 65 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 66 | chmod +x $DIY_P1_SH 67 | cd openwrt 68 | $GITHUB_WORKSPACE/$DIY_P1_SH 69 | 70 | - name: Update feeds 71 | run: cd openwrt && ./scripts/feeds update -a 72 | 73 | - name: Install feeds 74 | run: cd openwrt && ./scripts/feeds install -a 75 | 76 | - name: Load custom configuration 77 | run: | 78 | [ -e files ] && mv files openwrt/files 79 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 80 | chmod +x $DIY_P2_SH 81 | cd openwrt 82 | $GITHUB_WORKSPACE/$DIY_P2_SH 83 | 84 | - name: SSH connection to Actions 85 | uses: P3TERX/ssh2actions@v1.0.0 86 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') 87 | env: 88 | TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} 89 | TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} 90 | 91 | - name: Download package 92 | id: package 93 | run: | 94 | cd openwrt 95 | make defconfig 96 | make download -j8 97 | find dl -size -1024c -exec ls -l {} \; 98 | find dl -size -1024c -exec rm -f {} \; 99 | 100 | - name: Compile the firmware 101 | id: compile 102 | run: | 103 | cd openwrt 104 | echo -e "$(nproc) thread compile" 105 | make -j$(nproc) || make -j1 || make -j1 V=s 106 | echo "::set-output name=status::success" 107 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 108 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 109 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 110 | 111 | - name: Check space usage 112 | if: (!cancelled()) 113 | run: df -hT 114 | 115 | - name: Upload bin directory 116 | uses: actions/upload-artifact@main 117 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 118 | with: 119 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 120 | path: openwrt/bin 121 | 122 | - name: Organize files 123 | id: organize 124 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 125 | run: | 126 | cd openwrt/bin/targets/*/* 127 | rm -rf packages 128 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 129 | echo "::set-output name=status::success" 130 | 131 | - name: Upload firmware directory 132 | uses: actions/upload-artifact@main 133 | if: steps.organize.outputs.status == 'success' && !cancelled() 134 | with: 135 | name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 136 | path: ${{ env.FIRMWARE }} 137 | 138 | - name: Upload firmware to cowtransfer 139 | id: cowtransfer 140 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 141 | run: | 142 | curl -fsSL git.io/file-transfer | sh 143 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 144 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 145 | echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")" 146 | 147 | - name: Upload firmware to WeTransfer 148 | id: wetransfer 149 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 150 | run: | 151 | curl -fsSL git.io/file-transfer | sh 152 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 153 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 154 | echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")" 155 | 156 | - name: Generate release tag 157 | id: tag 158 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 159 | run: | 160 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")" 161 | touch release.txt 162 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 163 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 164 | echo "::set-output name=status::success" 165 | 166 | - name: Upload firmware to release 167 | uses: softprops/action-gh-release@v1 168 | if: steps.tag.outputs.status == 'success' && !cancelled() 169 | env: 170 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 171 | with: 172 | tag_name: ${{ steps.tag.outputs.release_tag }} 173 | body_path: release.txt 174 | files: ${{ env.FIRMWARE }}/* 175 | 176 | - name: Delete workflow runs 177 | uses: GitRML/delete-workflow-runs@main 178 | with: 179 | retain_days: 1 180 | keep_minimum_runs: 3 181 | 182 | - name: Remove old Releases 183 | uses: dev-drprasad/delete-older-releases@v0.1.0 184 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 185 | with: 186 | keep_latest: 3 187 | delete_tags: true 188 | env: 189 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 190 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 P3TERX 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Netkeeper-OpenWrt 2 | [![Lean x64](https://github.com/Maskbugzero/Netkeeper-OpenWrt/actions/workflows/Lean%20x64.yml/badge.svg)](https://github.com/Maskbugzero/Netkeeper-OpenWrt/actions/workflows/Lean%20x64.yml) 3 | 4 | 使用 GitHub Actions 云编译 带有 闪讯拨号插件(Netkeeper)的OpenWrt编译项目。 5 | ## Tips 6 | SSH 连接到 Actions 7 | - 复制 SSH 连接命令粘贴到终端内执行,或者复制链接在浏览器中打开使用网页终端。(网页终端可能会遇到黑屏的情况,按 Ctrl+C 即可) 8 | - cd openwrt && make menuconfig 9 | - 完成后按Ctrl+D组合键或执行exit命令退出,后续编译工作将自动进行。 10 | ## 默认编译 11 | - 用户名:root 密码为空 管理IP:192.168.1.1 12 | ## 使用方法 13 | 具体方法请点击 [文档](https://blog.5772447.xyz/posts/500de237/) 14 | 也可自行查看wiki 15 | ## 基于 16 | - [feed-netkeeper](https://github.com/CCnut/feed-netkeeper) 17 | - [SingleNet-Robot](https://github.com/kuretru/SingleNet-Robot) 18 | - [Microsoft Azure](https://azure.microsoft.com) 19 | - [GitHub Actions](https://github.com/features/actions) 20 | - [OpenWrt](https://github.com/openwrt/openwrt) 21 | - [Lean's OpenWrt](https://github.com/coolsnowwolf/lede) 22 | - [tmate](https://github.com/tmate-io/tmate) 23 | - [mxschmitt/action-tmate](https://github.com/mxschmitt/action-tmate) 24 | - [csexton/debugger-action](https://github.com/csexton/debugger-action) 25 | - [Cowtransfer](https://cowtransfer.com) 26 | - [WeTransfer](https://wetransfer.com/) 27 | - [Mikubill/transfer](https://github.com/Mikubill/transfer) 28 | - [softprops/action-gh-release](https://github.com/softprops/action-gh-release) 29 | - [c-hive/gha-remove-artifacts](https://github.com/c-hive/gha-remove-artifacts) 30 | - [dev-drprasad/delete-older-releases](https://github.com/dev-drprasad/delete-older-releases) 31 | -------------------------------------------------------------------------------- /config/4B.config: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_bcm27xx=y 2 | CONFIG_TARGET_bcm27xx_bcm2711=y 3 | CONFIG_TARGET_bcm27xx_bcm2711_DEVICE_rpi-4=y 4 | CONFIG_PACKAGE_luci-app-netkeeper-interception=y 5 | CONFIG_PACKAGE_luci-mod-rpc=y 6 | 7 | # USB Support 8 | CONFIG_PACKAGE_kmod-chaoskey=y 9 | CONFIG_PACKAGE_kmod-usb-acm=y 10 | CONFIG_PACKAGE_kmod-usb-atm=y 11 | CONFIG_PACKAGE_kmod-usb-atm-cxacru=y 12 | CONFIG_PACKAGE_kmod-usb-atm-speedtouch=y 13 | CONFIG_PACKAGE_kmod-usb-atm-ueagle=y 14 | CONFIG_PACKAGE_kmod-usb-cm109=y 15 | CONFIG_PACKAGE_kmod-usb-core=y 16 | CONFIG_PACKAGE_kmod-usb-dwc2=y 17 | CONFIG_PACKAGE_kmod-usb-dwc3=y 18 | CONFIG_PACKAGE_kmod-usb-ehci=y 19 | CONFIG_PACKAGE_kmod-usb-gadget=y 20 | CONFIG_PACKAGE_kmod-usb-gadget-cdc-composite=y 21 | CONFIG_PACKAGE_kmod-usb-gadget-ehci-debug=y 22 | CONFIG_PACKAGE_kmod-usb-gadget-eth=y 23 | CONFIG_PACKAGE_kmod-usb-gadget-hid=y 24 | CONFIG_PACKAGE_kmod-usb-gadget-mass-storage=y 25 | CONFIG_PACKAGE_kmod-usb-gadget-ncm=y 26 | CONFIG_PACKAGE_kmod-usb-gadget-serial=y 27 | CONFIG_PACKAGE_kmod-usb-hid=y 28 | CONFIG_PACKAGE_kmod-usb-hid-cp2112=y 29 | CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y 30 | CONFIG_PACKAGE_kmod-usb-lib-composite=y 31 | CONFIG_PACKAGE_kmod-usb-net=y 32 | CONFIG_PACKAGE_kmod-usb-net-aqc111=y 33 | CONFIG_PACKAGE_kmod-usb-net-asix=y 34 | CONFIG_PACKAGE_kmod-usb-net-asix-ax88179=y 35 | CONFIG_PACKAGE_kmod-usb-net-cdc-eem=y 36 | CONFIG_PACKAGE_kmod-usb-net-cdc-ether=y 37 | CONFIG_PACKAGE_kmod-usb-net-cdc-mbim=y 38 | CONFIG_PACKAGE_kmod-usb-net-cdc-ncm=y 39 | CONFIG_PACKAGE_kmod-usb-net-cdc-subset=y 40 | CONFIG_PACKAGE_kmod-usb-net-dm9601-ether=y 41 | CONFIG_PACKAGE_kmod-usb-net-hso=y 42 | CONFIG_PACKAGE_kmod-usb-net-huawei-cdc-ncm=y 43 | CONFIG_PACKAGE_kmod-usb-net-ipheth=y 44 | CONFIG_PACKAGE_kmod-usb-net-kalmia=y 45 | CONFIG_PACKAGE_kmod-usb-net-kaweth=y 46 | CONFIG_PACKAGE_kmod-usb-net-mcs7830=y 47 | CONFIG_PACKAGE_kmod-usb-net-pegasus=y 48 | CONFIG_PACKAGE_kmod-usb-net-pl=y 49 | CONFIG_PACKAGE_kmod-usb-net-qmi-wwan=y 50 | CONFIG_PACKAGE_kmod-usb-net-rndis=y 51 | CONFIG_PACKAGE_kmod-usb-net-rtl8150=y 52 | CONFIG_PACKAGE_kmod-usb-net-rtl8152=y 53 | CONFIG_PACKAGE_kmod-usb-net-sierrawireless=y 54 | # CONFIG_PACKAGE_kmod-usb-net-smsc75xx is not set 55 | CONFIG_PACKAGE_kmod-usb-net-smsc95xx=y 56 | CONFIG_PACKAGE_kmod-usb-net-sr9700=y 57 | CONFIG_PACKAGE_kmod-usb-net2280=y 58 | CONFIG_PACKAGE_kmod-usb-ohci=y 59 | CONFIG_PACKAGE_kmod-usb-ohci-pci=y 60 | CONFIG_PACKAGE_kmod-usb-printer=y 61 | CONFIG_PACKAGE_kmod-usb-roles=y 62 | CONFIG_PACKAGE_kmod-usb-serial=y 63 | CONFIG_PACKAGE_kmod-usb-serial-ark3116=y 64 | CONFIG_PACKAGE_kmod-usb-serial-belkin=y 65 | CONFIG_PACKAGE_kmod-usb-serial-ch341=y 66 | CONFIG_PACKAGE_kmod-usb-serial-cp210x=y 67 | CONFIG_PACKAGE_kmod-usb-serial-cypress-m8=y 68 | CONFIG_PACKAGE_kmod-usb-serial-dmx_usb_module=y 69 | CONFIG_PACKAGE_kmod-usb-serial-edgeport=y 70 | CONFIG_PACKAGE_kmod-usb-serial-ftdi=y 71 | CONFIG_PACKAGE_kmod-usb-serial-garmin=y 72 | CONFIG_PACKAGE_kmod-usb-serial-ipw=y 73 | CONFIG_PACKAGE_kmod-usb-serial-keyspan=y 74 | CONFIG_PACKAGE_kmod-usb-serial-mct=y 75 | CONFIG_PACKAGE_kmod-usb-serial-mos7720=y 76 | CONFIG_PACKAGE_kmod-usb-serial-mos7840=y 77 | CONFIG_PACKAGE_kmod-usb-serial-option=y 78 | CONFIG_PACKAGE_kmod-usb-serial-oti6858=y 79 | CONFIG_PACKAGE_kmod-usb-serial-pl2303=y 80 | CONFIG_PACKAGE_kmod-usb-serial-qualcomm=y 81 | CONFIG_PACKAGE_kmod-usb-serial-sierrawireless=y 82 | CONFIG_PACKAGE_kmod-usb-serial-simple=y 83 | CONFIG_PACKAGE_kmod-usb-serial-ti-usb=y 84 | CONFIG_PACKAGE_kmod-usb-serial-visor=y 85 | CONFIG_PACKAGE_kmod-usb-serial-wwan=y 86 | CONFIG_PACKAGE_kmod-usb-serial-xr_usb_serial_common=y 87 | CONFIG_PACKAGE_kmod-usb-storage=y 88 | CONFIG_PACKAGE_kmod-usb-storage-extras=y 89 | CONFIG_PACKAGE_kmod-usb-storage-uas=y 90 | CONFIG_PACKAGE_kmod-usb-uhci=y 91 | CONFIG_PACKAGE_kmod-usb-wdm=y 92 | CONFIG_PACKAGE_kmod-usb-xhci-hcd=y 93 | CONFIG_PACKAGE_kmod-usb-yealink=y 94 | CONFIG_PACKAGE_kmod-usb2=y 95 | CONFIG_PACKAGE_kmod-usb2-pci=y 96 | CONFIG_PACKAGE_kmod-usb3=y 97 | CONFIG_PACKAGE_kmod-usbip=y 98 | CONFIG_PACKAGE_kmod-usbip-client=y 99 | CONFIG_PACKAGE_kmod-usbip-server=y 100 | CONFIG_PACKAGE_kmod-usbmon=y 101 | -------------------------------------------------------------------------------- /config/k2p.config: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_ramips=y 2 | CONFIG_TARGET_ramips_mt7621=y 3 | CONFIG_TARGET_ramips_mt7621_DEVICE_phicomm_k2p=y 4 | CONFIG_PACKAGE_luci-app-netkeeper-interception=y 5 | CONFIG_PACKAGE_luci-mod-rpc=y 6 | -------------------------------------------------------------------------------- /config/x64.config: -------------------------------------------------------------------------------- 1 | CONFIG_TARGET_x86=y 2 | CONFIG_TARGET_x86_64=y 3 | CONFIG_TARGET_x86_64_DEVICE_generic=y 4 | CONFIG_PACKAGE_luci-app-netkeeper-interception=y 5 | CONFIG_PACKAGE_luci-mod-rpc=y 6 | CONFIG_TARGET_IMAGES_GZIP=y 7 | -------------------------------------------------------------------------------- /diy-part1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part1.sh 10 | # Description: OpenWrt DIY script part 1 (Before Update feeds) 11 | # 12 | 13 | # Uncomment a feed source 14 | #sed -i 's/^#\(.*helloworld\)/\1/' feeds.conf.default 15 | 16 | # Add a feed source 17 | echo 'src-git helloworld https://github.com/fw876/helloworld' >>feeds.conf.default 18 | #echo 'src-git passwall https://github.com/xiaorouji/openwrt-passwall' >>feeds.conf.default 19 | #echo 'src-git netkeeper https://github.com/CCnut/feed-netkeeper;LUCI-LUA-UCITRACK' >>feeds.conf.default 20 | echo 'src-git netkeeper https://github.com/yuhanjin/feed-netkeeper;LUCI-LUA-UCITRACK' >>feeds.conf.default 21 | -------------------------------------------------------------------------------- /diy-part2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part2.sh 10 | # Description: OpenWrt DIY script part 2 (After Update feeds) 11 | # 12 | 13 | # Modify default IP 14 | #sed -i 's/192.168.1.1/192.168.50.5/g' package/base-files/files/bin/config_generate 15 | 16 | # 设置密码为空(安装固件时无需密码登陆,然后自己修改想要的密码) 17 | sed -i 's@.*CYXluq4wUazHjmCDBCqXF*@#&@g' package/lean/default-settings/files/zzz-default-settings 18 | --------------------------------------------------------------------------------