Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
然后七年
luci-app-pushbot
提交
c9d69c69
L
luci-app-pushbot
项目概览
然后七年
/
luci-app-pushbot
9 个月 前同步成功
通知
61
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
luci-app-pushbot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
c9d69c69
编写于
7月 22, 2022
作者:
然
然后七年
提交者:
GitHub
7月 22, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SetCombine
上级
d5d07a6f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
201 addition
and
0 deletion
+201
-0
.github/workflows/build-package-onx86.yml
.github/workflows/build-package-onx86.yml
+201
-0
未找到文件。
.github/workflows/build-package-onx86.yml
0 → 100644
浏览文件 @
c9d69c69
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# Description: Build OpenWrt using GitHub Actions
#
name
:
Build luci-app-pushbot-x86
on
:
repository_dispatch
:
workflow_dispatch
:
inputs
:
ssh
:
description
:
'
SSH
connection
to
Actions'
required
:
false
default
:
'
false'
# schedule:
# - cron: 10 14 * * 5
env
:
REPO_URL
:
https://github.com/coolsnowwolf/lede
REPO_BRANCH
:
master
model
:
x86
PackageName
:
luci-app-pushbot
PackageSource_URL
:
https://github.com/zzsj0928/luci-app-pushbot
UPLOAD_Package
:
true
UPLOAD_COWTRANSFER
:
false
UPLOAD_WETRANSFER
:
false
UPLOAD_RELEASE
:
true
TZ
:
Asia/Shanghai
UPLOAD_ZZNAS
:
false
ftp_username
:
${{ secrets.FTP_USERNAME }}
ftp_psw
:
${{ secrets.FTP_PSW }}
ftp_ip
:
${{ secrets.FTP_IP }}
TargetPath
:
OpenwrtImgs/packages/luci-app-pushbot
upload_file
:
luci-app-pushbot_*
whkey
:
${{ secrets.WEBHOOK }}
jobs
:
build
:
runs-on
:
ubuntu-latest
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 /usr/local/lib/android /opt/ghc
sudo -E apt-get -qq update
sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-2004)
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
-
name
:
Update feeds
run
:
cd openwrt && ./scripts/feeds update -a
-
name
:
Install feeds
run
:
cd openwrt && ./scripts/feeds install -a
-
name
:
Load custom configuration
run
:
|
[ -e files ] && mv files openwrt/files
cd openwrt
rm -rf ./feeds/luci/applications/$PackageName
git clone $PackageSource_URL package/$PackageName
echo "CONFIG_PACKAGE_$PackageName=y" >> ./.config
-
name
:
SSH connection to Actions
uses
:
P3TERX/ssh2actions@v1.0.0
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
:
Download package
id
:
package
run
:
|
cd openwrt
make defconfig
make download -j8
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
-
name
:
Compile the package
id
:
compile
run
:
|
send_dingding="curl -s \"https://oapi.dingtalk.com/robot/send?access_token=${whkey}\" -H 'Content-Type: application/json' -d '{\"msgtype\": \"markdown\",\"markdown\": {\"title\":"
send_content0="【${model}】正在启动编译!请稍后大约4小时..."
markdown_splitline="\n\n---\n\n"
GITHUB_WORKFLOW_URL=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
nowtime=`date "+%Y-%m-%d %H:%M:%S"`
eval "$send_dingding \"${send_content0}\",\"text\":\"${nowtime} $markdown_splitline #### <font color=#6A65FF>${send_content0}</font>\n\n[点此链接查看](${GITHUB_WORKFLOW_URL})\"}}'"
cd openwrt
echo -e "$(nproc) thread compile"
make package/$PackageName/compile V=s
echo "::set-output name=status::success"
-
name
:
Check space usage
if
:
(!cancelled())
run
:
df -hT
-
name
:
Organize files
id
:
organize
if
:
env.UPLOAD_Package == 'true' && !cancelled()
run
:
|
cd openwrt/bin/targets/*/*
cd packages
echo "PackagePath=$PWD" >> $GITHUB_ENV
echo "::set-output name=status::success"
-
name
:
Upload package
uses
:
actions/upload-artifact@main
if
:
steps.organize.outputs.status == 'success' && !cancelled()
with
:
name
:
${{ env.upload_file }}
path
:
${{ env.PackagePath }}
-
name
:
Upload package to cowtransfer
id
:
cowtransfer
if
:
steps.organize.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 ${PackagePath}/${upload_file} 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
:
Upload firmware to WeTransfer
id
:
wetransfer
if
:
steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled()
run
:
|
curl -fsSL git.io/file-transfer | sh
./transfer wet -s -p 16 --no-progress ${PackagePath}/${upload_file} 2>&1 | tee wetransfer.log
echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)"
echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")"
-
name
:
Upload firmware to my NAS
id
:
zz-nas
if
:
steps.organize.outputs.status == 'success' && env.UPLOAD_ZZNAS == 'true' && !cancelled()
run
:
|
send_dingding="curl -s \"https://oapi.dingtalk.com/robot/send?access_token=${whkey}\" -H 'Content-Type: application/json' -d '{\"msgtype\": \"markdown\",\"markdown\": {\"title\":"
send_content1="【${model}】编译成功!正在上传固件到NAS..."
send_content2="【${model}】编译成功!固件成功上传到NAS。"
markdown_splitline="\n\n---\n\n"
GITHUB_WORKFLOW_URL=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
nowtime=`date "+%Y-%m-%d %H:%M:%S"`
eval "$send_dingding \"${send_content1}\",\"text\":\"${nowtime} $markdown_splitline #### <font color=#6A65FF>${send_content1}</font>\n\n[点此链接查看](${GITHUB_WORKFLOW_URL})\"}}'"
cd openwrt/bin/targets/*/*
cd packages
echo $ftp_psw > /tmp/rsync.psw && chmod 600 /tmp/rsync.psw
rsync -avrzP $upload_file_1 $ftp_username@$ftp_ip::$TargetPath/$(date +"%Y.%m.%d-%H%M")/ --password-file=/tmp/rsync.psw
echo "::warning file=zz-nas.com::All Released Files Uploaded to ZZ-NAS"
nowtime=`date "+%Y-%m-%d %H:%M:%S"`
eval "$send_dingding \"${send_content2}\",\"text\":\"${nowtime} $markdown_splitline #### <font color=#92D050>${send_content2}</font>\n\n[点此链接查看](${GITHUB_WORKFLOW_URL})\"}}'"
-
name
:
Generate release tag
id
:
tag
if
:
env.UPLOAD_RELEASE == 'true' && !cancelled()
run
:
|
echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")"
touch release.txt
[ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt
[ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt
echo "::set-output name=status::success"
-
name
:
Upload package to release
uses
:
softprops/action-gh-release@v1
if
:
steps.tag.outputs.status == 'success' && !cancelled()
env
:
GITHUB_TOKEN
:
${{ secrets.GITHUB_TOKEN }}
with
:
tag_name
:
${{ steps.tag.outputs.release_tag }}
body_path
:
release.txt
files
:
${{ env.PackagePath }}/${{ env.upload_file }}
-
name
:
Delete workflow runs
uses
:
GitRML/delete-workflow-runs@main
with
:
retain_days
:
1
keep_minimum_runs
:
3
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录