mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
37 lines
986 B
YAML
37 lines
986 B
YAML
name: Scheduled Pre-commit
|
||
|
||
on:
|
||
schedule:
|
||
# 每天 UTC 21:00 运行(北京时间 5:00)
|
||
- cron: "0 21 * * *"
|
||
workflow_dispatch: # 允许手动触发
|
||
|
||
jobs:
|
||
pre-commit:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Checkout
|
||
uses: actions/checkout@v6
|
||
with:
|
||
fetch-depth: 0
|
||
show-progress: false
|
||
|
||
- name: Setup and run Prek
|
||
uses: j178/prek-action@v2
|
||
id: pre-commit
|
||
continue-on-error: true
|
||
with:
|
||
extra-args: '--all-files'
|
||
|
||
- name: Commit and push changes
|
||
if: steps.pre-commit.outcome == 'failure' && github.repository_owner == 'MaaAssistantArknights'
|
||
uses: actions-js/push@master
|
||
with:
|
||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||
message: "chore: Auto update by pre-commit hooks
|
||
|
||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||
|
||
[skip changelog]"
|
||
branch: ${{ github.ref }}
|