Lede-23.05-N1 #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lede-23.05-N1 | |
on: | |
workflow_dispatch: | |
inputs: | |
ssh: | |
description: 'SSH connection to Actions' | |
required: false | |
default: 'false' | |
schedule: | |
- cron: "0 0 1,16 * *" | |
env: | |
REPO_URL: https://github.com/coolsnowwolf/lede | |
REPO_BRANCH: master | |
CONFIG_FILE: N1/2024-0407.config | |
DIY_SH: N1/Lede-diy.sh | |
#FILES: N1/files | |
TZ: Asia/Shanghai | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Free up space | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: true | |
- name: Initialize environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo -E apt-get -qq update -y | |
sudo -E apt-get -qq install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ | |
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ | |
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ | |
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ | |
genisoimage msmtp nano ninja-build npm p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip qemu-utils \ | |
rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev libfuse-dev | |
sudo -E apt-get -qq autoremove --purge | |
sudo -E apt-get -qq clean | |
sudo timedatectl set-timezone "$TZ" | |
sudo mkdir -p /workdir | |
sudo chown $USER:$GROUPS /workdir | |
- name: Clone source code | |
working-directory: /workdir | |
run: | | |
git clone $REPO_URL -b $REPO_BRANCH --single-branch --depth=1 openwrt | |
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt | |
echo "DATE=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV | |
- name: Update & Install feeds | |
run: | | |
chmod +x $DIY_SH | |
cd openwrt | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
$GITHUB_WORKSPACE/$DIY_SH | |
./scripts/feeds update -a | |
./scripts/feeds install -a | |
- name: Load custom config | |
run: | | |
#[ -e $FILES ] && mv $FILES openwrt/files | |
[ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config | |
- name: SSH connect to Actions | |
uses: P3TERX/ssh2actions@main | |
if: (github.event.inputs.ssh == 'true') || contains(github.event.action, 'ssh') | |
- name: Download package | |
working-directory: ./openwrt | |
run: | | |
make defconfig | |
make download -j8 | |
find dl -size -1024c -exec ls -l {} \; | |
find dl -size -1024c -exec rm -f {} \; | |
- name: Compile the firmware | |
run: | | |
chmod -R 755 openwrt | |
cd openwrt | |
echo -e "$(nproc) thread compile" | |
make -j$(nproc) || make -j1 || make -j1 V=s | |
echo "compile_status=success" >> $GITHUB_ENV | |
- name: Package armsr as openwrt | |
if: ${{ env.compile_status }} == 'success' && !cancelled() | |
uses: unifreq/openwrt_packit@master | |
env: | |
OPENWRT_ARMVIRT: openwrt/bin/targets/*/*/*.tar.gz | |
KERNEL_REPO_URL: breakingbadboy/OpenWrt | |
KERNEL_VERSION_NAME: 6.1.y_6.6.y | |
#PACKAGE_SOC: diy | |
PACKAGE_SOC: s905d | |
GZIP_IMGS: .xz | |
#SCRIPT_DIY_PATH: N1/mk_s905d_n1.sh | |
WHOAMI: ham | |
SW_FLOWOFFLOAD: 0 | |
SFE_FLOW: 0 | |
- name: Upload firmware to release | |
uses: softprops/action-gh-release@master | |
if: ${{ env.PACKAGED_STATUS == 'success' }} && !cancelled() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: OpenWrt_${{ env.PACKAGED_OUTPUTDATE }} | |
files: ${{ env.PACKAGED_OUTPUTPATH }}/*.img.xz | |
body: | | |
📂 源码: ${{ env.REPO_URL }} | |
🌳 分支: ${{ env.REPO_BRANCH }} | |
🌐 管理地址: 192.168.123.2 | |
👤 用户名: root | |
🔒 密码: password | |
🍁 更新日志: | |
2025-0226:lede的源码测试93+内核。 | |
- name: Delete old releases | |
uses: dev-drprasad/delete-older-releases@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
keep_latest: 7 | |
delete_tags : true |