From 54f44a4cab225a991f60232a5a9db931e0c1a29e Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Tue, 8 Sep 2020 11:23:08 +0800 Subject: [PATCH] Add files via upload --- .github/workflows/AutoBuild.yml | 84 +++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .github/workflows/AutoBuild.yml diff --git a/.github/workflows/AutoBuild.yml b/.github/workflows/AutoBuild.yml new file mode 100644 index 0000000..c9f4b24 --- /dev/null +++ b/.github/workflows/AutoBuild.yml @@ -0,0 +1,84 @@ +#================================================= +# Description: Build OpenWrt using GitHub Actions +# Lisence: MIT +# Author: P3TERX,eSirPlayground +# Modify: Hyy2001 +#================================================= + +name: AutoBuild + +on: + release: + types: [published] + + #push: + # branches: + # - master + + #schedule: + # - cron: 0 8 * * 5 + + watch: + types: [started] + +env: + REPO_URL: https://github.com/coolsnowwolf/lede + REPO_BRANCH: master + CONFIG_FILE: .config + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Initialization environment + env: + DEBIAN_FRONTEND: noninteractive + run: | + sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc + sudo -E apt-get -qq update + sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) + sudo -E apt-get -qq autoremove --purge + sudo -E apt-get -qq clean + + - name: Clone source code + run: | + git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt + cd openwrt + sed -i "s/#src-git helloworld/src-git helloworld/g" feeds.conf.default + + - name: Update & Install feeds + run: | + cd openwrt + ./scripts/feeds update -a + ./scripts/feeds install -a + ./scripts/feeds install -a + + - name: Configuration Customization - AutoBuild + run: | + [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config + chmod +x ./customize.sh && ./customize.sh + cd openwrt + + - name: Download package + run: | + cd openwrt + make defconfig + make download -j8 + find dl -size -1024c -exec ls -l {} \; + find dl -size -1024c -exec rm -f {} \; + + - name: Build firmware + working-directory: ./openwrt + run: | + echo -e "$(nproc) thread build." + make -j$(nproc) V=s + + - name : Upload artifact + uses: actions/upload-artifact@master + with: + name: OpenWrt + path: openwrt/bin