Releases big openwrt #32
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
#======================================================================================================================== | |
# https://github.com/ophub/amlogic-s9xxx-openwrt | |
# Description: Use Releases file to packaging | |
# Cron: min (0 - 59) / hour (0 - 23) / day of month (1 - 31) / month (1 - 12) / day of week (0 - 6)(Sunday - Saturday) | |
#======================================================================================================================== | |
name: Releases big openwrt | |
on: | |
repository_dispatch: | |
workflow_dispatch: | |
inputs: | |
ssh: | |
description: 'SSH connection' | |
required: false | |
default: 'false' | |
schedule: | |
- cron: '45 23 * * *' | |
env: | |
REPO_URL: https://github.com/coolsnowwolf/lede | |
REPO_BRANCH: master | |
FEEDS_CONF: feeds.conf.default | |
CONFIG_FILE: ARMv8/lede-huge.config | |
DIY_P1_SH: diy-part1.sh | |
DIY_P2_SH: diy-part2.sh | |
UPLOAD_FIRMWARE: false | |
UPLOAD_RELEASE: true | |
RECENT_LASTEST: 30 | |
TZ: Asia/Shanghai | |
FILE_NAME: ARMv8 | |
PRODUCT_NAME: ARMv8 | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
docker rmi `docker images -q` | |
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 https://is.gd/depends_ubuntu_2204) | |
sudo -E apt-get -qq autoremove --purge | |
sudo -E apt-get -qq clean | |
sudo timedatectl set-timezone "$TZ" | |
sudo mkdir -p /workdir | |
sudo chown $USER:$GROUPS /workdir | |
- name: Clone source code | |
working-directory: /workdir | |
run: | | |
df -hT $PWD | |
git clone $REPO_URL -b $REPO_BRANCH openwrt | |
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt | |
cd openwrt | |
useVersionInfo=$(git show -s --date=short --format="Author: %an<br/>date: %cd<br/>commit: %s<br/>commit hash: %H") | |
echo "useVersionInfo=$useVersionInfo" >> $GITHUB_ENV | |
echo "DATE=$(date "+%Y-%m-%d %H:%M:%S")" >> $GITHUB_ENV | |
echo "DATE1=$(date "+%Y-%m-%d")" >> $GITHUB_ENV | |
- name: Package Armvirt as OpenWrt | |
if: (!cancelled()) | |
uses: ophub/flippy-openwrt-actions@main | |
env: | |
OPENWRT_ARMVIRT: https://github.com/breakings/OpenWrt/releases/download/openwrt_armvirt/openwrt-armvirt-64-generic-rootfs.tar.gz | |
PACKAGE_SOC: all | |
WHOAMI: breakings | |
#KERNEL_REPO_URL: https://github.com/breakings/OpenWrt/tree/main/opt | |
KERNEL_VERSION_NAME: 6.1.86_6.6.27 | |
#OPENWRT_VER: R23.5.1 | |
KERNEL_AUTO_LATEST: true | |
GZIP_IMGS: .gz | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: SSH connection to Actions @ Ctrl+C to enter, Ctrl+D to exit | |
uses: P3TERX/ssh2actions@main | |
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') | |
env: | |
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} | |
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
- name: Upload artifact to Actions | |
uses: kittaakos/upload-artifact-as-is@master | |
if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_FIRMWARE == 'true' && !cancelled() | |
with: | |
path: ${{ env.PACKAGED_OUTPUTPATH }}/ | |
- name: Upload OpenWrt Firmware to Release | |
id: release | |
uses: ncipollo/release-action@main | |
if: env.PACKAGED_STATUS == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() | |
with: | |
name: R${{ env.DATE }} for ${{ env.FILE_NAME }} | |
allowUpdates: true | |
removeArtifacts: true | |
tag: ${{ env.FILE_NAME }} | |
commit: main | |
token: ${{ secrets.RELEASES_TOKEN }} | |
artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* | |
body: | | |
- 默认IP:192.168.1.1 默认密码:password (WiFi密码同) | |
- 当前使用版本:【编译前的最后一次➦[主源码](https://github.com/coolsnowwolf/lede)更新记录】 | |
- 高大全版取消了➦[Node](https://github.com/breakings/OpenWrt/releases/download/openwrt_armvirt/node_v16.19.1-1_aarch64_cortex-a53.ipk),目前仅➦[网易云解锁NodeJS](https://github.com/breakings/OpenWrt/releases/download/openwrt_armvirt/netease.tar.gz)版受影响,可单独下载ipk安装。 | |
- 此版仍然**精简**了部分F大本人集成的插件,故依旧推荐使用F大本人发布的➦[正式版本](https://github.com/breakings/OpenWrt/releases/tag/flippy_openwrt)。 | |
- 此版仅满足部分喜欢追新的群友方便在线更新固件使用。 | |
- 此版因集成插件比自用精简版更多,无法做到每日更新。 | |
- 因变动较大,从60或以下版本升级到61或更高版本建议**全新刷入**或者**不保留配置**进行升级。 | |
- 常见问题及注意事项请参考恩山F大➦[最新帖](https://www.right.com.cn/forum/thread-4076037-1-1.html) | |
- 需要**自用精简版**请到 精简版➦[下载](https://github.com/breakings/OpenWrt/releases/tag/armv8_mini) | |
${{ env.useVersionInfo }} | |
- name: Delete workflow runs | |
uses: GitRML/delete-workflow-runs@main | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ github.repository }} | |
retain_days: 60 | |
keep_minimum_runs: 60 | |
- name: Remove old Releases | |
uses: dev-drprasad/delete-older-releases@v0.3.3 | |
if: env.UPLOAD_RELEASE == 'true' && !cancelled() | |
with: | |
repo: | |
keep_latest: 30 | |
delete_tag_pattern: | |
delete_tags: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Telegram notification | |
run: | | |
MSG=" | |
打包时间:${{ env.DATE }} | |
OpenWrt 更新信息:${{ env.useVersionInfo }} | |
${{ env.PRODUCT_NAME }} 打包完成 | |
" | |
curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage" -d "chat_id=${{ secrets.TELEGRAM_TO }}&text=${MSG}" |