mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-python](https://github.com/actions/setup-python). Updates `actions/checkout` from 4 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) Updates `actions/setup-python` from 5 to 6 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
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
|
||
|
||
- name: Setup Python
|
||
uses: actions/setup-python@v6
|
||
with:
|
||
python-version: "3.12"
|
||
|
||
- name: Install pre-commit
|
||
run: pip install pre-commit
|
||
|
||
- name: Run pre-commit on all files
|
||
id: pre-commit
|
||
continue-on-error: true
|
||
run: pre-commit run --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 }}
|