From 963bf049b043929f7eb22e9ec39baab65c31b51a Mon Sep 17 00:00:00 2001 From: cnk Date: Sat, 26 Oct 2024 11:17:40 +0800 Subject: [PATCH] chore(CI): update format to daily --- .github/workflows/autocorrect-check.yml | 16 +++------------- .github/workflows/sync.yml | 4 ++-- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/autocorrect-check.yml b/.github/workflows/autocorrect-check.yml index f6ae637..8cd5716 100644 --- a/.github/workflows/autocorrect-check.yml +++ b/.github/workflows/autocorrect-check.yml @@ -1,10 +1,9 @@ name: AutoCorrect Markdown Check on: - push: - branches: [main] - pull_request: - branches: [main] + workflow_dispatch: + schedule: + - cron: "0 0 * * *" jobs: autocorrect: @@ -27,15 +26,6 @@ jobs: # 安装并运行 prettier npm install -g prettier prettier --write . - - # 检查是否有文件更改 - - name: Check for changes - run: git diff --exit-code || git status - - # 如果有更改,则配置 Git 提交用户名和邮箱,并提交更改 - - name: Commit changes - if: failure() - run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" git add . diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 1cbfca9..79e2d33 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -1,9 +1,9 @@ name: "Upstream Sync" on: + workflow_dispatch: schedule: - cron: "0 0 * * *" # 每天同步一次 - workflow_dispatch: jobs: sync_latest_from_upstream: @@ -23,4 +23,4 @@ jobs: target_sync_repo: Ac-Wiki/AcWiKi target_sync_branch: main target_repo_token: ${{ secrets.GITHUB_TOKEN }} - test_mode: false \ No newline at end of file + test_mode: false