forked from haiibo/OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (109 loc) · 4.75 KB
/
ARMv8-Package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: ARMv8 Package
on:
workflow_dispatch:
# schedule:
# - cron: 0 15 * * *
watch:
types: started
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
UPLOAD_RELEASE: true
TZ: Asia/Shanghai
jobs:
Package:
runs-on: ubuntu-22.04
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id
name: Package for ${{ matrix.version }}
strategy:
fail-fast: false
matrix:
include:
- version: MINI
explain: ARMv8 精简版,主打科学上网适合养老
- version: PLUS
explain: ARMv8 多功能版,集成插件多适合折腾
steps:
- name: Checkout
uses: actions/checkout@main
- name: Initialization Environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
docker rmi $(docker images -q)
sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android $AGENT_TOOLSDIRECTORY
sudo -E apt-get -y update
sudo -E apt-get -y install $(curl -fsSL is.gd/depends_ubuntu_2204)
sudo -E apt-get -y autoremove --purge
sudo -E apt-get -y clean
sudo timedatectl set-timezone "$TZ"
- name: Clone Source Code
run: |
df -hT $GITHUB_WORKSPACE
git clone $REPO_URL -b $REPO_BRANCH openwrt
cd openwrt
COMMIT_AUTHOR=$(git show -s --date=short --format="作者: %an")
echo "COMMIT_AUTHOR=$COMMIT_AUTHOR" >> $GITHUB_ENV
COMMIT_DATE=$(git show -s --date=short --format="时间: %ci")
echo "COMMIT_DATE=$COMMIT_DATE" >> $GITHUB_ENV
COMMIT_MESSAGE=$(git show -s --date=short --format="内容: %s")
echo "COMMIT_MESSAGE=$COMMIT_MESSAGE" >> $GITHUB_ENV
COMMIT_HASH=$(git show -s --date=short --format="hash: %H")
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
- name: Download Armvirt Firmware
id: download
run: |
FIRMWARE_PATH=openwrt/bin/targets/armvirt/64
[ -d $FIRMWARE_PATH ] || mkdir -p $FIRMWARE_PATH
FIRMWARE_URL=$(curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/releases" | grep -o "ROOTFS_${{ matrix.version }}.*rootfs.tar.gz")
wget -q -P $FIRMWARE_PATH https://github.com/$GITHUB_REPOSITORY/releases/download/$FIRMWARE_URL
echo "status=success" >> $GITHUB_OUTPUT
echo "DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
echo "DATE1=$(date +"%y.%m.%d")" >> $GITHUB_ENV
- name: Package OpenWrt Firmware
if: steps.download.outputs.status == 'success'
uses: ophub/flippy-openwrt-actions@main
env:
OPENWRT_ARMVIRT: openwrt/bin/targets/*/*/*rootfs.tar.gz
PACKAGE_SOC: all
WHOAMI: Haiibo
KERNEL_VERSION_NAME: 5.15.13_6.1.5
KERNEL_AUTO_LATEST: true
DISTRIB_REVISION: R${{ env.DATE1 }} by Haiibo
- name: Upload OpenWrt To Artifact
if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE != 'true'
uses: kittaakos/upload-artifact-as-is@master
with:
path: ${{ env.PACKAGED_OUTPUTPATH }}
- name: Upload OpenWrt To Release
if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE == 'true'
uses: ncipollo/release-action@v1
with:
name: R${{ env.DATE }} for ARMv8_${{ matrix.version }}
allowUpdates: true
removeArtifacts: true
tag: ARMv8_${{ matrix.version }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*
body: |
**This is OpenWrt Firmware for Armvirt 64**
### 📒 固件信息
- 🚀 ${{ matrix.explain }}
- 💻 平台架构: armvirt-64
- ⚽ 固件源码: ${{ env.REPO_URL }}
- 💝 源码分支: ${{ env.REPO_BRANCH }}
- 🌐 默认地址: 192.168.1.1
- 🔑 默认密码: password
### 🍻 安装与更新
- 用插件安装: 系统 → 晶晨宝盒 → 安装 OpenWrt → 选择型号 → 安装
- 用命令安装: U盘启动成功后输入命令 `openwrt-install-amlogic` 按照英文提示写入到 emmc
- 用插件更新: 系统 → 晶晨宝盒 → 在线下载更新 → 完整更新全系统
- 用命令更新: 上传固件到 `/mnt/mmcblk2p4` 目录,输入命令 `openwrt-update-amlogic` 即可更新
- 注意: 如非 `amlogic` 平台,请将其更改为对应平台 `rockchip` `allwinner`
- 部分常见问题及注意事项请参考恩山论坛F大➦[最新帖](https://www.right.com.cn/forum/thread-4076037-1-1.html)
### 🧊 固件版本
- 固件编译前最后一次➦[主源码](${{ env.REPO_URL }})更新记录
- ${{ env.COMMIT_AUTHOR }}
- ${{ env.COMMIT_DATE }}
- ${{ env.COMMIT_MESSAGE }}
- ${{ env.COMMIT_HASH }}