Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
736 changed files
with
95,844 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# | ||
# Copyright (c) 2019-2021 P3TERX <https://p3terx.com> | ||
# | ||
# This is free software, licensed under the MIT License. | ||
# See /LICENSE for more information. | ||
# | ||
# https://github.com/P3TERX/Actions-OpenWrt | ||
# File: .github/workflows/update-checker.yml | ||
# Description: Source code update checker | ||
# | ||
|
||
name: Update Checker | ||
|
||
env: | ||
REPO_URL_LEDE: https://github.com/coolsnowwolf/lede | ||
REPO_BRANCH: master | ||
REPO_URL_SSRPLUS: https://github.com/fw876/helloworld | ||
REPO_URL_PASSWALL: https://github.com/xiaorouji/openwrt-passwall | ||
REPO_BRANCH_PASSWALL: main | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 00 23 * * * | ||
|
||
jobs: | ||
lede: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Get Commit Hash | ||
id: getHash | ||
run: | | ||
git clone --depth 1 $REPO_URL_LEDE -b $REPO_BRANCH . | ||
echo "::set-output name=commitHash::$(git rev-parse HEAD)" | ||
- name: Compare Commit Hash | ||
id: cacheHash | ||
uses: actions/cache@v2 | ||
with: | ||
path: .commitHash | ||
key: HEAD-${{ steps.getHash.outputs.commitHash }} | ||
|
||
- name: Save New Commit Hash | ||
if: steps.cacheHash.outputs.cache-hit != 'true' | ||
run: | | ||
echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash | ||
- name: Trigger build | ||
if: steps.cacheHash.outputs.cache-hit != 'true' | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.RELEASES_TOKEN }} | ||
event-type: lede Source Code Update | ||
|
||
ssrplus: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Get Commit Hash | ||
id: getHash | ||
run: | | ||
git clone --depth 1 $REPO_URL_SSRPLUS -b $REPO_BRANCH . | ||
echo "::set-output name=commitHash::$(git rev-parse HEAD)" | ||
- name: Compare Commit Hash | ||
id: cacheHash | ||
uses: actions/cache@v2 | ||
with: | ||
path: .commitHash | ||
key: HEAD-${{ steps.getHash.outputs.commitHash }} | ||
|
||
- name: Save New Commit Hash | ||
if: steps.cacheHash.outputs.cache-hit != 'true' | ||
run: | | ||
echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash | ||
- name: Trigger build | ||
if: steps.cacheHash.outputs.cache-hit != 'true' | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.RELEASES_TOKEN }} | ||
event-type: ssrplus Source Code Update | ||
|
||
passwall: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Get Commit Hash | ||
id: getHash | ||
run: | | ||
git clone --depth 1 $REPO_URL_PASSWALL -b $REPO_BRANCH_PASSWALL . | ||
echo "::set-output name=commitHash::$(git rev-parse HEAD)" | ||
- name: Compare Commit Hash | ||
id: cacheHash | ||
uses: actions/cache@v2 | ||
with: | ||
path: .commitHash | ||
key: HEAD-${{ steps.getHash.outputs.commitHash }} | ||
|
||
- name: Save New Commit Hash | ||
if: steps.cacheHash.outputs.cache-hit != 'true' | ||
run: | | ||
echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash | ||
- name: Trigger build | ||
if: steps.cacheHash.outputs.cache-hit != 'true' | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.RELEASES_TOKEN }} | ||
event-type: passwall Source Code Update | ||
|
||
- name: Delete workflow runs | ||
uses: GitRML/delete-workflow-runs@main | ||
with: | ||
retain_days: 1 | ||
keep_minimum_runs: 1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: Build HK1 img57+o | ||
|
||
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: 6 | ||
|
||
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: 57 | ||
release_name: HK1-jcnf-mini-57+o.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/Netflixxp/op-/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/Netflixxp/op-/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 mk_s905x3_multi.sh | ||
sudo ./mk_s905x3_multi.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/ hk1-Openwrt-img | 编译 | ||
allowUpdates: true | ||
tag: ${{ env.version }} | ||
commit: main | ||
token: ${{ secrets.RELEASES_TOKEN }} | ||
body: | | ||
## 以下为N1和HK1的最新固件(如遇上游更新,次日上午7时自动编译打包最新固件) | ||
默认IP:192.168.1.99 默认密码: password | ||
Openwrt🚀(注:此版本为jcnf个人的精简版。只有+o版,+o版为flowoffload加速) | ||
N1和HK1在线升级方法: | ||
1. cd /mnt/mmcblk2p4 | ||
2. wget 升级脚本链接,鼠标右击后缀.sh文件获取链接地址 | ||
3. wget img.gz后缀名的固件链接,鼠标右击后缀.img.gz文件获取链接地址 | ||
4. gzip -d 解压缩上一步下载的固件全名 | ||
5. chmod +x *.sh | ||
6. ./升级脚本名字 img固件名 | ||
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/delete-older-releases@v0.1.0 | ||
with: | ||
keep_latest: 3 | ||
delete_tags: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
over: | ||
needs: [build] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: TG notification #TG推送 | ||
run: curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" -d "chat_id=${{ secrets.TELEGRAM_CHAT_ID }}&text=HK157+o打包成功" |
Oops, something went wrong.