forked from haiibo/OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (98 loc) · 3.95 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
#===============================================
# Description: ARMv8 Package
# File name: armv8-package.yml
# Lisence: MIT
# Author: HAIIBO
# https://github.com/haiibo
#===============================================
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 多功能版,集成插件多适合折腾
env:
VERSION: ${{ matrix.version }}
EXPLAIN: ${{ matrix.explain }}
steps:
- name: Checkout
uses: actions/checkout@main
- name: Initialization Environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /etc/mysql /etc/php /usr/local/lib/android
sudo -E apt-get -qq update
sudo -E apt-get -y install $(curl -fsSL is.gd/depends_ubuntu_2204)
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
sudo timedatectl set-timezone "$TZ"
- name: Clone Source Code
run: |
git clone $REPO_URL -b $REPO_BRANCH openwrt
cd openwrt
VERSION_INFO=$(git show -s --date=short --format="Author: %an<br/>date: %cd<br/>commit: %s<br/>commit hash: %H")
echo "VERSION_INFO=$VERSION_INFO" >> $GITHUB_ENV
echo "DATE=$(date +"%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV
echo "DATE1=$(date +"%y.%m.%d")" >> $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_$VERSION.*rootfs.tar.gz")
wget -q -P $FIRMWARE_PATH https://github.com/$GITHUB_REPOSITORY/releases/download/$FIRMWARE_URL
echo "status=success" >> $GITHUB_OUTPUT
- 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_${{ env.VERSION }}
allowUpdates: true
removeArtifacts: true
tag: ARMv8_${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/*
body: |
**This is OpenWrt Firmware for Armvirt 64**
* ${{ env.EXPLAIN }}
默认 IP:192.168.1.1 默认密码:password
安装到 EMMC:系统 → 晶晨宝盒 → 安装 OpenWrt → 选择型号 → 安装
升级 OpenWrt:系统 → 晶晨宝盒 → 手动上传更新 或者 在线下载更新
常见问题及注意事项请参考恩山F大➦[最新帖](https://www.right.com.cn/forum/thread-4076037-1-1.html)
当前使用版本:【编译前的最后一次➦[主源码](https://github.com/coolsnowwolf/lede)更新记录】
${{ env.VERSION_INFO }}