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 {