Update .gitea/workflows/maintenance.yaml
All checks were successful
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 1m23s

This commit is contained in:
2023-12-12 16:23:01 +01:00
parent 80039cba2c
commit dca3af1f92

View File

@ -1,41 +1,51 @@
name: Auto Maintenance Cycle name: Auto Maintenance Cycle
on: on:
schedule: push:
- cron: 0 1 * * * paths:
push: - .gitea/workflows/maintenance.yaml
paths: schedule:
- .gitea/workflows/maintenance.yaml - cron: '@weekly'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
auto-update: auto-update:
name: pre-commit Autoupdate name: pre-commit Autoupdate
runs-on: pi64 runs-on: pi64
steps: env:
- uses: actions/checkout@v4 SPECIFIC_BRANCH: chore/update-pre-commit
- uses: actions/setup-python@v4 steps:
- uses: actions/checkout@v4
- run: pip install pre-commit with:
shell: bash ref: main
- run: pre-commit autoupdate token: ${{ secrets.REPO_TOKEN }}
shell: bash - name: Attempt to checkout specific branch
- run: SKIP=no-commit-to-branch pre-commit run -a uses: actions/checkout@v4
- name: Commit with:
id: auto-commit-action ref: ${{ env.SPECIFIC_BRANCH }}
uses: stefanzweifel/git-auto-commit-action@v5 token: ${{ secrets.REPO_TOKEN }}
with: continue-on-error: true
commit_message: 'chore: update pre-commit hooks' - uses: actions/setup-python@v4
branch: update/pre-commit-hooks - run: pip install pre-commit
push_options: --force shell: bash
create_branch: true - run: pre-commit autoupdate
- name: Generate Date shell: bash
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Test pre-commit
- name: Create an PR run: SKIP=no-commit-to-branch pre-commit run -a
if: steps.auto-commit-action.outputs.changes_detected == 'true' - name: Commit
uses: ./ id: auto-commit-action
with: uses: stefanzweifel/git-auto-commit-action@v5
token: ${{ secrets.REPO_TOKEN }} with:
branch: update/pre-commit-hooks commit_message: 'chore: update pre-commit hooks'
title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }} branch: ${{ env.SPECIFIC_BRANCH }}
body: Update to the pre-commit action. create_branch: true
- name: Generate Date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Create an PR action
if: steps.auto-commit-action.outputs.changes_detected == 'true'
uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main
with:
token: ${{ secrets.REPO_TOKEN }}
branch: ${{ env.SPECIFIC_BRANCH }}
title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }}
body: Update to the pre-commit action.