Build N1 70+o and 70+ #1249
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: Build N1 70+o and 70+ | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
inputs: | |
days: | |
description: 'Number of days.' | |
required: true | |
default: 60 | |
minimum_runs: | |
description: 'The minimum runs to keep for each workflow.' | |
required: true | |
default: 24 | |
schedule: | |
- cron: 30 23 * * * | |
env: | |
UPLOAD_COWTRANSFER: false | |
RELEASE: true | |
TZ: Asia/Shanghai | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
name: Build for ${{ matrix.flippy_name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- flippy_name: 70+o | |
release_name: N1-wangxiaofeng-70+o.img | |
- flippy_name: 70+ | |
release_name: N1-wangxiaofeng-70+.img | |
env: | |
FLIPPY_NAME: ${{ matrix.flippy_name }} | |
RELEASE_NAME: ${{ matrix.release_name }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Initialization environment | |
run: | | |
version=$(curl -s "https://api.github.com/repos/wxfyes/N1openwrt/releases/latest" | awk -F '"' '/tag_name/{print $4}') | |
echo "version=$version" >> $GITHUB_ENV | |
echo "DATE=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV | |
sudo chmod -R 777 /opt | |
cp -r ${FLIPPY_NAME}/opt/* /opt | |
- name: Download | |
run: | | |
cd /opt/kernel | |
wget https://github.com/wxfyes/N1openwrt/releases/download/$version/openwrt-armvirt-64-default-rootfs.tar.gz | |
- name: Check Files | |
run: | | |
cd /opt/kernel | |
ls | |
- name: Install the package | |
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 xz-utils btrfs-progs gawk zip unzip curl dosfstools uuid-runtime | |
sudo -E apt-get -qq install git git-core | |
sudo -E apt-get -qq install pigz | |
sudo -E apt-get -qq autoremove --purge | |
sudo -E apt-get -qq clean | |
- name: build img | |
run: | | |
sudo chmod -R 777 /opt | |
cd /opt/kernel | |
sudo chmod +x *.sh | |
sudo ./mk_s905d_n1.sh | |
- name: copy update files | |
run: | | |
cd /opt/kernel | |
sudo cp files/update-amlogic-openwrt.sh tmp/update-amlogic-openwrt.sh | |
- name: pigz -9 | |
id: pigz | |
run: | | |
sudo chmod -R 777 /opt/kernel/tmp | |
cd /opt/kernel/tmp | |
sudo pigz -9 $RELEASE_NAME | |
echo "::set-output name=status::success" | |
- name: Check Files4 | |
run: | | |
cd /opt/kernel/tmp | |
ls | |
- name: 编译后硬盘容量 | |
if: (!cancelled()) | |
run: df -hT | |
- name: Create release | |
id: release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: ${{ env.DATE }} 🚀 N1-Openwrt-img | 编译 | |
allowUpdates: true | |
tag: ${{ env.version }} | |
commit: main | |
token: ${{ secrets.TOKEN }} | |
body: | | |
## 以下为N1的最新固件(每日上午7:30左右自动编译打包最新固件) | |
默认IP:192.168.1.254 默认密码: password | |
无线名称:Phicomm_n1 无线密码:password | |
Openwrt (注:此版本为王晓峰个人的精简版。+o版内核更稳定) | |
[博客查看更多内容](https://wxf2088.xyz) | |
[推荐vps服务器①-CN2GIA](https://wxf2088.xyz/2499.html) | |
[推荐vps服务器②-CMI](https://wxf2088.xyz/2905.html) | |
[推荐vps服务器③-美西](https://wxf2088.xyz/1923.html) | |
[高配便宜vps-普通线路](https://tianquege.top/#/register?code=Ybv8Nuvs) | |
[精品线路机场](https://tianquege.top/#/register?code=Ybv8Nuvs) | |
artifacts: "/opt/kernel/tmp/*" | |
- name: Upload firmware to WeTransfer | |
if: steps.gz.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() | |
run: | | |
curl -fsSL git.io/file-transfer | sh | |
./transfer cow --block 2621440 -s -p 64 --no-progress /opt/openwrt/tmp/$RELEASE_NAME.gz 2>&1 | tee cowtransfer.log | |
echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" | |
echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")" | |
- name: Remove old Releases | |
uses: dev-drprasad/[email protected] | |
with: | |
keep_latest: 10 | |
delete_tags: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |