Some checks failed
Auto Maintenance Cycle / pre-commit Autoupdate (push) Failing after 31s
Reworked the action to include an pass for the 409 error. Reviewed-on: #20 Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de> Co-committed-by: Philipp Horstenkamp <philipp@horstenkamp.de>
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Auto Maintenance Cycle
|
|
|
|
on:
|
|
schedule:
|
|
- cron: 0 1 * * *
|
|
push:
|
|
paths:
|
|
- .gitea/workflows/maintenance.yaml
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
auto-update:
|
|
name: pre-commit Autoupdate
|
|
runs-on: pi64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v4
|
|
|
|
- run: pip install pre-commit
|
|
shell: bash
|
|
- run: pre-commit autoupdate
|
|
shell: bash
|
|
- run: pre-commit run -a
|
|
- name: Commit
|
|
id: auto-commit-action
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: 'chore: update pre-commit hooks'
|
|
branch: update/pre-commit-hooks
|
|
push_options: --force
|
|
create_branch: true
|
|
- name: Generate Date
|
|
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
|
- name: Create an PR
|
|
if: steps.auto-commit-action.outputs.changes_detected == 'true'
|
|
uses: ./
|
|
with:
|
|
token: ${{ secrets.REPO_TOKEN }}
|
|
branch: update/pre-commit-hooks
|
|
title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }}
|
|
body: Update to the pre-commit action.
|