ARMv8 Package #81
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
#=============================================== | |
# 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 }} |