pull file
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Close Stale Issues / close_stale_issues (push) Has been cancelled
repo-sync / repo-sync (push) Has been cancelled
auto-deploy-tencent-scf / pre-check (push) Has been cancelled
auto-deploy-tencent-scf / deploy serverless (push) Has been cancelled
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Close Stale Issues / close_stale_issues (push) Has been cancelled
repo-sync / repo-sync (push) Has been cancelled
auto-deploy-tencent-scf / pre-check (push) Has been cancelled
auto-deploy-tencent-scf / deploy serverless (push) Has been cancelled
This commit is contained in:
47
gitHubActions/README.md
Normal file
47
gitHubActions/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# GitHub Actions 部署
|
||||
|
||||
<!-- TOC depthFrom:2 -->
|
||||
|
||||
- [介绍](#介绍)
|
||||
- [步骤](#步骤)
|
||||
- [复刻项目](#复刻项目)
|
||||
- [添加 Secrets 配置](#添加-secrets-配置)
|
||||
- [测试运行 Actions](#测试运行-actions)
|
||||
- [其他](#其他)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
## 介绍
|
||||
GA 是微软(巨硬)收购 G 站之后新增的内置 CI/CD 方案,其核心就是一个可以运行脚本的小型服务器。
|
||||
|
||||
有了它,我们就可以实现每天线上自动运行我们的应用程序,通过配置还可以实现版本的自动同步更新。
|
||||
|
||||
## 步骤
|
||||
### 复刻项目
|
||||
首先点击本页面右上角的 fork 按钮,复刻本项目到自己的仓库
|
||||
|
||||
### 添加 Secrets 配置
|
||||
进入自己 fork 的仓库,点击 Settings-> Secrets-> New Secrets, 添加 1 个 Secrets,其名称为`COOKIESTR`,值为刚才我们保存的 `cookie 字符串`。它们将作为配置项,在应用启动时传入程序。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
### 测试运行 Actions
|
||||
刚 Fork 完,所有 Actions 都是默认关闭的,都配置好后,需要手动点击 Enable 开启 Actions。开启后请手动执行一次工作流,验证是否可以正常工作,操作步骤如下图所示:
|
||||
|
||||

|
||||
|
||||
运行结束后,请查看运行日志:
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## 其他
|
||||
Actions 的执行策略默认是每天 0 点整触发运行,如要设置为指定的运行时间,请详见下面**常见问题**章节中的《**Actions 如何修改定时任务的执行时间?**》
|
||||
|
||||
**建议每个人都设置下每日执行时间!不要使用默认时间!最好也不要设定在整点,错开峰值,避免 G 站的同一个IP在相同时间去请求 B 站接口,导致 IP 被禁!**
|
||||
|
||||
**应用运行后,会进行0到30分钟的随机睡眠,是为了使每天定时运行时间在范围内波动。刚开始如果需要频繁调试,建议使用empty-task.yml来调试,或者参考下面的个性化自定义配置章节,将睡眠配置为1分钟,避免每次测试都需要等待半小时**
|
||||
100
gitHubActions/bak/bilibili-daily-task.yml
Normal file
100
gitHubActions/bak/bilibili-daily-task.yml
Normal file
@@ -0,0 +1,100 @@
|
||||
# 每日任务
|
||||
|
||||
name: bilibili-daily-task
|
||||
|
||||
|
||||
on:
|
||||
workflow_dispatch: # 手动触发
|
||||
schedule: # 计划任务触发
|
||||
- cron: '0 16 * * *'
|
||||
# cron表达式,时区是UTC时间,比我们早8小时,如上所表示的是每天0点0分(16+8=24点整)
|
||||
# 建议每个人通过设置名称为 Production 的 GitHub Environments 来设定为自己的目标运行时间(详细设置方法见文档说明)
|
||||
|
||||
env:
|
||||
ASPNETCORE_ENVIRONMENT: ${{secrets.ENV}} # 运行环境
|
||||
Ray_BiliBiliCookies__1: ${{secrets.COOKIESTR}}
|
||||
Ray_BiliBiliCookies__2: ${{secrets.COOKIESTR2}}
|
||||
Ray_BiliBiliCookies__3: ${{secrets.COOKIESTR3}}
|
||||
# 推送:
|
||||
Ray_Serilog__WriteTo__3__Args__botToken: ${{secrets.PUSHTGTOKEN}} # Telegram
|
||||
Ray_Serilog__WriteTo__3__Args__chatId: ${{secrets.PUSHTGCHATID}}
|
||||
Ray_Serilog__WriteTo__3__Args__restrictedToMinimumLevel: ${{secrets.PUSHTGLEVEL}}
|
||||
Ray_Serilog__WriteTo__4__Args__webHookUrl: ${{secrets.PUSHWEIXINURL}} # 企业微信
|
||||
Ray_Serilog__WriteTo__4__Args__restrictedToMinimumLevel: ${{secrets.PUSHWEIXINLEVEL}}
|
||||
Ray_Serilog__WriteTo__5__Args__webHookUrl: ${{secrets.PUSHDINGURL}} # 钉钉
|
||||
Ray_Serilog__WriteTo__5__Args__restrictedToMinimumLevel: ${{secrets.PUSHDINGLEVEL}}
|
||||
Ray_Serilog__WriteTo__6__Args__scKey: ${{secrets.PUSHSCKEY}} # Server酱
|
||||
Ray_Serilog__WriteTo__6__Args__turboScKey: ${{secrets.PUSHSERVERTSCKEY}}
|
||||
Ray_Serilog__WriteTo__6__Args__restrictedToMinimumLevel: ${{secrets.PUSHSERVERLEVEL}}
|
||||
Ray_Serilog__WriteTo__7__Args__sKey: ${{secrets.PUSHCOOLSKEY}} # 酷推
|
||||
Ray_Serilog__WriteTo__7__Args__restrictedToMinimumLevel: ${{secrets.PUSHCOOLLEVEL}}
|
||||
Ray_Serilog__WriteTo__8__Args__api: ${{secrets.PUSHOTHERAPI}} # 自定义api
|
||||
Ray_Serilog__WriteTo__8__Args__placeholder: ${{secrets.PUSHOTHERPLACEHOLDER}}
|
||||
Ray_Serilog__WriteTo__8__Args__bodyJsonTemplate: ${{secrets.PUSHOTHERBODYJSONTEMPLATE}}
|
||||
Ray_Serilog__WriteTo__8__Args__restrictedToMinimumLevel: ${{secrets.PUSHOTHERLEVEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__token: ${{secrets.PUSHPLUSTOKEN}} # PushPlus
|
||||
Ray_Serilog__WriteTo__9__Args__topic: ${{secrets.PUSHPLUSTOPIC}}
|
||||
Ray_Serilog__WriteTo__9__Args__channel: ${{secrets.PUSHPLUSCHANNEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__webhook: ${{secrets.PUSHPLUSWEBHOOK}}
|
||||
Ray_Serilog__WriteTo__9__Args__restrictedToMinimumLevel: ${{secrets.PUSHPLUSLEVEL}}
|
||||
# 安全相关:
|
||||
Ray_Security__IsSkipDailyTask: ${{secrets.ISSKIPDAILYTASK}}
|
||||
Ray_Security__IntervalSecondsBetweenRequestApi: ${{secrets.INTERVALSECONDSBETWEENREQUESTAPI}}
|
||||
Ray_Security__IntervalMethodTypes: ${{secrets.INTERVALMETHODTYPES}}
|
||||
Ray_Security__UserAgent: ${{secrets.USERAGENT}}
|
||||
Ray_Security__WebProxy: ${{secrets.WEBPROXY}}
|
||||
Ray_Security__RandomSleepMaxMin: ${{secrets.RANDOMSLEEPMAXMIN}}
|
||||
# 每日任务:
|
||||
Ray_DailyTaskConfig__NumberOfCoins: ${{secrets.NUMBEROFCOINS}}
|
||||
Ray_DailyTaskConfig__SaveCoinsWhenLv6: ${{secrets.SAVECOINSWHENLV6}}
|
||||
Ray_DailyTaskConfig__SelectLike: ${{secrets.SELECTLIKE}}
|
||||
Ray_DailyTaskConfig__SupportUpIds: ${{secrets.SUPPORTUPIDS}}
|
||||
Ray_DailyTaskConfig__DayOfAutoCharge: ${{secrets.DAYOFAUTOCHARGE}}
|
||||
Ray_DailyTaskConfig__AutoChargeUpId: ${{secrets.AUTOCHARGEUPID}}
|
||||
Ray_DailyTaskConfig__ChargeComment: ${{secrets.CHARGECOMMENT}}
|
||||
Ray_DailyTaskConfig__DayOfReceiveVipPrivilege: ${{secrets.DAYOFRECEIVEVIPPRIVILEGE}}
|
||||
Ray_DailyTaskConfig__DayOfExchangeSilver2Coin: ${{secrets.DAYOFEXCHANGESILVER2COIN}}
|
||||
Ray_DailyTaskConfig__DevicePlatform: ${{secrets.DEVICEPLATFORM}}
|
||||
Ray_Serilog__WriteTo__0__Args__restrictedToMinimumLevel: ${{secrets.CONSOLELOGLEVEL}}
|
||||
Ray_Serilog__WriteTo__0__Args__outputTemplate: ${{secrets.CONSOLELOGTEMPLATE}}
|
||||
|
||||
jobs:
|
||||
|
||||
pre-check:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
result: ${{ steps.check.outputs.result }} # 不能直接传递secrets的值,否则会被skip,需要转一下
|
||||
steps:
|
||||
- id: check
|
||||
if: env.IsOpenDailyTask=='true'
|
||||
run: |
|
||||
echo "::set-output name=result::开启"
|
||||
|
||||
run-daily-task:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
environment: Production
|
||||
needs: pre-check
|
||||
if: needs.pre-check.outputs.result=='开启'
|
||||
|
||||
steps:
|
||||
|
||||
# 设置服务器时区为东八区
|
||||
- name: Set time zone
|
||||
run: sudo timedatectl set-timezone 'Asia/Shanghai'
|
||||
|
||||
# 检出
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# .Net 环境
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
# 测试运行
|
||||
- name: Test APP
|
||||
run: |
|
||||
cd ./src/Ray.BiliBiliTool.Console
|
||||
dotnet run --runTasks=Daily
|
||||
91
gitHubActions/bak/empty-task.yml
Normal file
91
gitHubActions/bak/empty-task.yml
Normal file
@@ -0,0 +1,91 @@
|
||||
name: empty-task
|
||||
|
||||
on:
|
||||
workflow_dispatch: # 手动触发
|
||||
inputs:
|
||||
tasks:
|
||||
description: '任务Code'
|
||||
required: true
|
||||
|
||||
env:
|
||||
ASPNETCORE_ENVIRONMENT: ${{secrets.ENV}} # 运行环境
|
||||
Ray_CloseConsoleWhenEnd: 1
|
||||
Ray_BiliBiliCookies__1: ${{secrets.COOKIESTR}}
|
||||
Ray_BiliBiliCookies__2: ${{secrets.COOKIESTR2}}
|
||||
Ray_BiliBiliCookies__3: ${{secrets.COOKIESTR3}}
|
||||
# 推送:
|
||||
Ray_Serilog__WriteTo__3__Args__botToken: ${{secrets.PUSHTGTOKEN}} # Telegram
|
||||
Ray_Serilog__WriteTo__3__Args__chatId: ${{secrets.PUSHTGCHATID}}
|
||||
Ray_Serilog__WriteTo__3__Args__restrictedToMinimumLevel: ${{secrets.PUSHTGLEVEL}}
|
||||
Ray_Serilog__WriteTo__4__Args__webHookUrl: ${{secrets.PUSHWEIXINURL}} # 企业微信
|
||||
Ray_Serilog__WriteTo__4__Args__restrictedToMinimumLevel: ${{secrets.PUSHWEIXINLEVEL}}
|
||||
Ray_Serilog__WriteTo__5__Args__webHookUrl: ${{secrets.PUSHDINGURL}} # 钉钉
|
||||
Ray_Serilog__WriteTo__5__Args__restrictedToMinimumLevel: ${{secrets.PUSHDINGLEVEL}}
|
||||
Ray_Serilog__WriteTo__6__Args__scKey: ${{secrets.PUSHSCKEY}} # Server酱
|
||||
Ray_Serilog__WriteTo__6__Args__turboScKey: ${{secrets.PUSHSERVERTSCKEY}}
|
||||
Ray_Serilog__WriteTo__6__Args__restrictedToMinimumLevel: ${{secrets.PUSHSERVERLEVEL}}
|
||||
Ray_Serilog__WriteTo__7__Args__sKey: ${{secrets.PUSHCOOLSKEY}} # 酷推
|
||||
Ray_Serilog__WriteTo__7__Args__restrictedToMinimumLevel: ${{secrets.PUSHCOOLLEVEL}}
|
||||
Ray_Serilog__WriteTo__8__Args__api: ${{secrets.PUSHOTHERAPI}} # 自定义api
|
||||
Ray_Serilog__WriteTo__8__Args__placeholder: ${{secrets.PUSHOTHERPLACEHOLDER}}
|
||||
Ray_Serilog__WriteTo__8__Args__bodyJsonTemplate: ${{secrets.PUSHOTHERBODYJSONTEMPLATE}}
|
||||
Ray_Serilog__WriteTo__8__Args__restrictedToMinimumLevel: ${{secrets.PUSHOTHERLEVEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__token: ${{secrets.PUSHPLUSTOKEN}} # PushPlus
|
||||
Ray_Serilog__WriteTo__9__Args__topic: ${{secrets.PUSHPLUSTOPIC}}
|
||||
Ray_Serilog__WriteTo__9__Args__channel: ${{secrets.PUSHPLUSCHANNEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__webhook: ${{secrets.PUSHPLUSWEBHOOK}}
|
||||
Ray_Serilog__WriteTo__9__Args__restrictedToMinimumLevel: ${{secrets.PUSHPLUSLEVEL}}
|
||||
# 安全相关:
|
||||
Ray_Security__IsSkipDailyTask: ${{secrets.ISSKIPDAILYTASK}}
|
||||
Ray_Security__IntervalSecondsBetweenRequestApi: ${{secrets.INTERVALSECONDSBETWEENREQUESTAPI}}
|
||||
Ray_Security__IntervalMethodTypes: ${{secrets.INTERVALMETHODTYPES}}
|
||||
Ray_Security__UserAgent: ${{secrets.USERAGENT}}
|
||||
Ray_Security__WebProxy: ${{secrets.WEBPROXY}}
|
||||
Ray_Security__RandomSleepMaxMin: ${{secrets.RANDOMSLEEPMAXMIN}}
|
||||
# 每日任务:
|
||||
Ray_DailyTaskConfig__NumberOfCoins: ${{secrets.NUMBEROFCOINS}}
|
||||
Ray_DailyTaskConfig__SaveCoinsWhenLv6: ${{secrets.SAVECOINSWHENLV6}}
|
||||
Ray_DailyTaskConfig__SelectLike: ${{secrets.SELECTLIKE}}
|
||||
Ray_DailyTaskConfig__SupportUpIds: ${{secrets.SUPPORTUPIDS}}
|
||||
Ray_DailyTaskConfig__DayOfAutoCharge: ${{secrets.DAYOFAUTOCHARGE}}
|
||||
Ray_DailyTaskConfig__AutoChargeUpId: ${{secrets.AUTOCHARGEUPID}}
|
||||
Ray_DailyTaskConfig__ChargeComment: ${{secrets.CHARGECOMMENT}}
|
||||
Ray_DailyTaskConfig__DayOfReceiveVipPrivilege: ${{secrets.DAYOFRECEIVEVIPPRIVILEGE}}
|
||||
Ray_DailyTaskConfig__DayOfExchangeSilver2Coin: ${{secrets.DAYOFEXCHANGESILVER2COIN}}
|
||||
Ray_DailyTaskConfig__DevicePlatform: ${{secrets.DEVICEPLATFORM}}
|
||||
Ray_Serilog__WriteTo__0__Args__restrictedToMinimumLevel: ${{secrets.CONSOLELOGLEVEL}}
|
||||
Ray_Serilog__WriteTo__0__Args__outputTemplate: ${{secrets.CONSOLELOGTEMPLATE}}
|
||||
# 天选任务:
|
||||
Ray_LiveLotteryTaskConfig__ExcludeAwardNames: ${{secrets.EXCLUDEAWARDNAMES}} # 天选抽奖指定排除关键字
|
||||
Ray_LiveLotteryTaskConfig__IncludeAwardNames: ${{secrets.INCLUDEAWARDNAMES}} # 天选抽奖指定包含关键字
|
||||
Ray_LiveLotteryTaskConfig__AutoGroupFollowings: ${{secrets.AUTOGROUPFOLLOWINGS}} # 抽奖结束后是否将关注主播自动分组
|
||||
# 批量取关任务:
|
||||
Ray_UnfollowBatchedTaskConfig__GroupName: ${{secrets.UNFOLLOWGROUPNAME}}
|
||||
Ray_UnfollowBatchedTaskConfig__Count: ${{secrets.UNFOLLOWCOUNT}}
|
||||
|
||||
jobs:
|
||||
run-task:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
# 设置服务器时区为东八区
|
||||
- name: Set time zone
|
||||
run: sudo timedatectl set-timezone 'Asia/Shanghai'
|
||||
|
||||
# 检出
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# .Net 环境
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
# 运行
|
||||
- name: Run APP
|
||||
run: |
|
||||
cd ./src/Ray.BiliBiliTool.Console
|
||||
dotnet run --runTasks=${{ github.event.inputs.tasks }}
|
||||
101
gitHubActions/bak/live-lottery-task.yml
Normal file
101
gitHubActions/bak/live-lottery-task.yml
Normal file
@@ -0,0 +1,101 @@
|
||||
# 天选时刻抽奖任务
|
||||
|
||||
name: live-lottery-task
|
||||
|
||||
|
||||
on:
|
||||
|
||||
workflow_dispatch: # 手动触发
|
||||
schedule: # 计划任务触发
|
||||
- cron: '0 16 * * *'
|
||||
# cron表达式,时区是UTC时间,比我们早8小时,如上所表示的是每天0点0分(24点整)
|
||||
# 建议每个人通过设置名称为 LiveLottery 的 GitHub Environments 来设定为自己的目标运行时间(详细设置方法见文档说明)
|
||||
|
||||
env:
|
||||
IsOpenLiveLotteryTask: ${{secrets.ISOPENLIVELOTTERYTASK}} #是否开启该GitHub工作流
|
||||
ASPNETCORE_ENVIRONMENT: ${{secrets.ENV}} # 运行环境
|
||||
Ray_CloseConsoleWhenEnd: 1
|
||||
Ray_BiliBiliCookies__1: ${{secrets.COOKIESTR}}
|
||||
Ray_BiliBiliCookies__2: ${{secrets.COOKIESTR2}}
|
||||
Ray_BiliBiliCookies__3: ${{secrets.COOKIESTR3}}
|
||||
# 天选任务:
|
||||
Ray_LiveLotteryTaskConfig__ExcludeAwardNames: ${{secrets.EXCLUDEAWARDNAMES}} # 天选抽奖指定排除关键字
|
||||
Ray_LiveLotteryTaskConfig__IncludeAwardNames: ${{secrets.INCLUDEAWARDNAMES}} # 天选抽奖指定包含关键字
|
||||
Ray_LiveLotteryTaskConfig__AutoGroupFollowings: ${{secrets.AUTOGROUPFOLLOWINGS}} # 抽奖结束后是否将关注主播自动分组
|
||||
Ray_LiveLotteryTaskConfig__DenyUids: ${{secrets.LIVELOTTERYDENYUIDS}} # 天选筹抽奖主播Uid黑名单
|
||||
# 推送:
|
||||
Ray_Serilog__WriteTo__3__Args__botToken: ${{secrets.PUSHTGTOKEN}} # Telegram
|
||||
Ray_Serilog__WriteTo__3__Args__chatId: ${{secrets.PUSHTGCHATID}}
|
||||
Ray_Serilog__WriteTo__3__Args__restrictedToMinimumLevel: ${{secrets.PUSHTGLEVEL}}
|
||||
Ray_Serilog__WriteTo__4__Args__webHookUrl: ${{secrets.PUSHWEIXINURL}} # 企业微信
|
||||
Ray_Serilog__WriteTo__4__Args__restrictedToMinimumLevel: ${{secrets.PUSHWEIXINLEVEL}}
|
||||
Ray_Serilog__WriteTo__5__Args__webHookUrl: ${{secrets.PUSHDINGURL}} # 钉钉
|
||||
Ray_Serilog__WriteTo__5__Args__restrictedToMinimumLevel: ${{secrets.PUSHDINGLEVEL}}
|
||||
Ray_Serilog__WriteTo__6__Args__scKey: ${{secrets.PUSHSCKEY}} # Server酱
|
||||
Ray_Serilog__WriteTo__6__Args__turboScKey: ${{secrets.PUSHSERVERTSCKEY}}
|
||||
Ray_Serilog__WriteTo__6__Args__restrictedToMinimumLevel: ${{secrets.PUSHSERVERLEVEL}}
|
||||
Ray_Serilog__WriteTo__7__Args__sKey: ${{secrets.PUSHCOOLSKEY}} # 酷推
|
||||
Ray_Serilog__WriteTo__7__Args__restrictedToMinimumLevel: ${{secrets.PUSHCOOLLEVEL}}
|
||||
Ray_Serilog__WriteTo__8__Args__api: ${{secrets.PUSHOTHERAPI}} # 自定义api
|
||||
Ray_Serilog__WriteTo__8__Args__placeholder: ${{secrets.PUSHOTHERPLACEHOLDER}}
|
||||
Ray_Serilog__WriteTo__8__Args__bodyJsonTemplate: ${{secrets.PUSHOTHERBODYJSONTEMPLATE}}
|
||||
Ray_Serilog__WriteTo__8__Args__restrictedToMinimumLevel: ${{secrets.PUSHOTHERLEVEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__token: ${{secrets.PUSHPLUSTOKEN}} # PushPlus
|
||||
Ray_Serilog__WriteTo__9__Args__topic: ${{secrets.PUSHPLUSTOPIC}}
|
||||
Ray_Serilog__WriteTo__9__Args__channel: ${{secrets.PUSHPLUSCHANNEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__webhook: ${{secrets.PUSHPLUSWEBHOOK}}
|
||||
Ray_Serilog__WriteTo__9__Args__restrictedToMinimumLevel: ${{secrets.PUSHPLUSLEVEL}}
|
||||
# 安全相关:
|
||||
Ray_Security__IsSkipDailyTask: ${{secrets.ISSKIPDAILYTASK}}
|
||||
Ray_Security__IntervalSecondsBetweenRequestApi: ${{secrets.INTERVALSECONDSBETWEENREQUESTAPI}}
|
||||
Ray_Security__IntervalMethodTypes: ${{secrets.INTERVALMETHODTYPES}}
|
||||
Ray_Security__UserAgent: ${{secrets.USERAGENT}}
|
||||
Ray_Security__WebProxy: ${{secrets.WEBPROXY}}
|
||||
Ray_Security__RandomSleepMaxMin: ${{secrets.RANDOMSLEEPMAXMIN}}
|
||||
# Console日志:
|
||||
Ray_Serilog__WriteTo__0__Args__restrictedToMinimumLevel: ${{secrets.CONSOLELOGLEVEL}}
|
||||
Ray_Serilog__WriteTo__0__Args__outputTemplate: ${{secrets.CONSOLELOGTEMPLATE}}
|
||||
|
||||
jobs:
|
||||
|
||||
pre-check:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
result: ${{ steps.check.outputs.result }} # 不能直接传递secrets的值,否则会被skip,需要转一下
|
||||
steps:
|
||||
- id: check
|
||||
if: env.IsOpenLiveLotteryTask=='true'
|
||||
run: |
|
||||
echo "::set-output name=result::开启"
|
||||
|
||||
run-live-lottery:
|
||||
runs-on: ubuntu-latest
|
||||
needs: pre-check
|
||||
# if: env.IsOpenLiveLotteryTask=='true' # 这里job.if读取不到env或secrets,很坑...但是发现可以读到needs的outputs值
|
||||
if: needs.pre-check.outputs.result=='开启'
|
||||
|
||||
environment: LiveLottery
|
||||
|
||||
steps:
|
||||
|
||||
# 输出IP、设置服务器时区为东八区
|
||||
- name: PreWork
|
||||
run: |
|
||||
sudo curl ifconfig.me
|
||||
sudo timedatectl set-timezone 'Asia/Shanghai'
|
||||
|
||||
# 检出
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# .Net 环境
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
# 测试运行
|
||||
- name: Test APP
|
||||
run: |
|
||||
cd ./src/Ray.BiliBiliTool.Console
|
||||
dotnet run --runTasks=LiveLottery
|
||||
86
gitHubActions/bak/unfollow-batched-task.yml
Normal file
86
gitHubActions/bak/unfollow-batched-task.yml
Normal file
@@ -0,0 +1,86 @@
|
||||
# 批量取关
|
||||
|
||||
name: unfollow-batched-task
|
||||
|
||||
on:
|
||||
workflow_dispatch: # 手动触发
|
||||
inputs:
|
||||
group:
|
||||
description: '分组名称'
|
||||
required: true
|
||||
count:
|
||||
description: '目标取关个数(-1表示全部)'
|
||||
required: true
|
||||
|
||||
env:
|
||||
ASPNETCORE_ENVIRONMENT: ${{secrets.ENV}} # 运行环境
|
||||
Ray_CloseConsoleWhenEnd: 1
|
||||
Ray_BiliBiliCookies__1: ${{secrets.COOKIESTR}}
|
||||
Ray_BiliBiliCookies__2: ${{secrets.COOKIESTR2}}
|
||||
Ray_BiliBiliCookies__3: ${{secrets.COOKIESTR3}}
|
||||
# 推送:
|
||||
Ray_Serilog__WriteTo__3__Args__botToken: ${{secrets.PUSHTGTOKEN}} # Telegram
|
||||
Ray_Serilog__WriteTo__3__Args__chatId: ${{secrets.PUSHTGCHATID}}
|
||||
Ray_Serilog__WriteTo__3__Args__restrictedToMinimumLevel: ${{secrets.PUSHTGLEVEL}}
|
||||
Ray_Serilog__WriteTo__4__Args__webHookUrl: ${{secrets.PUSHWEIXINURL}} # 企业微信
|
||||
Ray_Serilog__WriteTo__4__Args__restrictedToMinimumLevel: ${{secrets.PUSHWEIXINLEVEL}}
|
||||
Ray_Serilog__WriteTo__5__Args__webHookUrl: ${{secrets.PUSHDINGURL}} # 钉钉
|
||||
Ray_Serilog__WriteTo__5__Args__restrictedToMinimumLevel: ${{secrets.PUSHDINGLEVEL}}
|
||||
Ray_Serilog__WriteTo__6__Args__scKey: ${{secrets.PUSHSCKEY}} # Server酱
|
||||
Ray_Serilog__WriteTo__6__Args__turboScKey: ${{secrets.PUSHSERVERTSCKEY}}
|
||||
Ray_Serilog__WriteTo__6__Args__restrictedToMinimumLevel: ${{secrets.PUSHSERVERLEVEL}}
|
||||
Ray_Serilog__WriteTo__7__Args__sKey: ${{secrets.PUSHCOOLSKEY}} # 酷推
|
||||
Ray_Serilog__WriteTo__7__Args__restrictedToMinimumLevel: ${{secrets.PUSHCOOLLEVEL}}
|
||||
Ray_Serilog__WriteTo__8__Args__api: ${{secrets.PUSHOTHERAPI}} # 自定义api
|
||||
Ray_Serilog__WriteTo__8__Args__placeholder: ${{secrets.PUSHOTHERPLACEHOLDER}}
|
||||
Ray_Serilog__WriteTo__8__Args__bodyJsonTemplate: ${{secrets.PUSHOTHERBODYJSONTEMPLATE}}
|
||||
Ray_Serilog__WriteTo__8__Args__restrictedToMinimumLevel: ${{secrets.PUSHOTHERLEVEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__token: ${{secrets.PUSHPLUSTOKEN}} # PushPlus
|
||||
Ray_Serilog__WriteTo__9__Args__topic: ${{secrets.PUSHPLUSTOPIC}}
|
||||
Ray_Serilog__WriteTo__9__Args__channel: ${{secrets.PUSHPLUSCHANNEL}}
|
||||
Ray_Serilog__WriteTo__9__Args__webhook: ${{secrets.PUSHPLUSWEBHOOK}}
|
||||
Ray_Serilog__WriteTo__9__Args__restrictedToMinimumLevel: ${{secrets.PUSHPLUSLEVEL}}
|
||||
# 安全相关:
|
||||
Ray_Security__IsSkipDailyTask: ${{secrets.ISSKIPDAILYTASK}}
|
||||
Ray_Security__IntervalSecondsBetweenRequestApi: ${{secrets.INTERVALSECONDSBETWEENREQUESTAPI}}
|
||||
Ray_Security__IntervalMethodTypes: ${{secrets.INTERVALMETHODTYPES}}
|
||||
Ray_Security__UserAgent: ${{secrets.USERAGENT}}
|
||||
Ray_Security__WebProxy: ${{secrets.WEBPROXY}}
|
||||
Ray_Security__RandomSleepMaxMin: ${{secrets.RANDOMSLEEPMAXMIN}}
|
||||
# 批量取关任务:
|
||||
Ray_UnfollowBatchedTaskConfig__GroupName: ${{ github.event.inputs.group }}
|
||||
Ray_UnfollowBatchedTaskConfig__Count: ${{ github.event.inputs.count }}
|
||||
Ray_UnfollowBatchedTaskConfig__RetainUids: ${{secrets.UNFOLLOWBATCHEDRETAINUIDS}}
|
||||
|
||||
jobs:
|
||||
run-task:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
# 设置服务器时区为东八区
|
||||
- name: Set time zone
|
||||
run: sudo timedatectl set-timezone 'Asia/Shanghai'
|
||||
|
||||
# 检出
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# .Net 环境
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
# 发布
|
||||
- name: Publish
|
||||
run: |
|
||||
cd ./src/Ray.BiliBiliTool.Console
|
||||
dotnet publish --configuration Release --self-contained false --output ./bin/Publish/net5-dependent
|
||||
|
||||
# 测试运行
|
||||
- name: Test APP
|
||||
run: |
|
||||
cd ./src/Ray.BiliBiliTool.Console
|
||||
dotnet run --runTasks=UnfollowBatched
|
||||
Reference in New Issue
Block a user