From 91fd57a89e52b681ec4582b216ae44b9bc4b8b7a Mon Sep 17 00:00:00 2001 From: austin1000 <5436513+StoneForests@users.noreply.github.com> Date: Wed, 17 Dec 2025 13:39:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4server=E9=85=B1=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=B6=88=E6=81=AF=E6=A0=BC=E5=BC=8F=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E6=B6=88=E6=81=AF=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= =?UTF-8?q?=20#=20=E4=BF=AE=E6=94=B9server=E9=85=B1=E7=9A=84=E6=8E=A8?= =?UTF-8?q?=E9=80=81=E6=96=B9=E5=BC=8F=20#=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8commit=E5=92=8Cclean=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto_clean.yaml | 15 +++++++++++++++ .github/workflows/auto_push.yaml | 32 +++++++++++++++++++++++++++++++ .github/workflows/main.yml | 7 +++++-- Program.cs | 3 ++- 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/auto_clean.yaml create mode 100644 .github/workflows/auto_push.yaml diff --git a/.github/workflows/auto_clean.yaml b/.github/workflows/auto_clean.yaml new file mode 100644 index 0000000..c297918 --- /dev/null +++ b/.github/workflows/auto_clean.yaml @@ -0,0 +1,15 @@ +name: 'workflows日志自动清理' + +on: + schedule: + - cron: '0 0 */3 * *' + workflow_dispatch: + +jobs: + del_workflow: + runs-on: ubuntu-latest + steps: + - name: Delete workflow runs + uses: GitRML/delete-workflow-runs@main + with: + retain_days: '3' \ No newline at end of file diff --git a/.github/workflows/auto_push.yaml b/.github/workflows/auto_push.yaml new file mode 100644 index 0000000..4205464 --- /dev/null +++ b/.github/workflows/auto_push.yaml @@ -0,0 +1,32 @@ +name: 自动push防止Actions自动停止 + +on: + workflow_dispatch: + schedule: + - cron: '0 0 1,15 * *' + repository_dispatch: + types: start_action + +jobs: + build: + runs-on: ubuntu-latest + if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id || github.actor == 'StoneForests' + + steps: + - name: Getting the repo + uses: actions/checkout@v3 + + - name: Re setting the url for `origin` + run: | + git remote set-url origin https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git + - name: Adding git info + run: | + git config --global user.name "StoneForests" + git config --global user.email "5436513+StoneForests@users.noreply.github.com" + - name: Creating an empty commit + run: | + git commit --allow-empty -m "Auto amazing commit" + + - name: Finilly pushing the repo + run: | + git push origin master \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 410c9c3..4ffcc0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,11 @@ name: Run on: - workflow_dispatch: - repository_dispatch: + workflow_dispatch: + schedule: + - cron: "0 22,14 * * *" + watch: + types: [started] jobs: build: diff --git a/Program.cs b/Program.cs index b9354f2..5eb40bf 100644 --- a/Program.cs +++ b/Program.cs @@ -196,7 +196,8 @@ async Task Notify(string msg, bool isFailed = false) int index = scKey.IndexOf(' '); if (index == -1) { - await _scClient.GetAsync($"https://sc.ftqq.com/{scKey}.send?text={msg}"); + await _scClient.GetAsync($"https://sctapi.ftqq.com/{scKey}.send?title=有道云笔记签到&desp={msg}"); + //await _scClient.GetAsync($"https://sc.ftqq.com/{scKey}.send?text={msg}"); } else {