Set default value to commiter and reviewer
All checks were successful
Lint / pre-commit Linting (push) Successful in 48s
Auto Maintenance Cycle / pre-commit Autoupdate (push) Successful in 1m37s

This commit is contained in:
Philipp Horstenkamp 2024-05-24 02:09:00 +02:00
parent 508eec34d7
commit 7f0b32347e

View File

@ -1,53 +1,57 @@
name: Auto Maintenance Cycle name: Auto Maintenance Cycle
on: on:
push: push:
paths: paths:
- .gitea/workflows/maintenance.yaml - .gitea/workflows/maintenance.yaml
schedule: schedule:
- cron: '@weekly' - 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
env: env:
SPECIFIC_BRANCH: chore/update-pre-commit SPECIFIC_BRANCH: chore/update-pre-commit
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
ref: main ref: main
token: ${{ secrets.REPO_TOKEN }} token: ${{ secrets.REPO_TOKEN }}
- name: Attempt to checkout specific branch - name: Attempt to checkout specific branch
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ env.SPECIFIC_BRANCH }} ref: ${{ env.SPECIFIC_BRANCH }}
token: ${{ secrets.REPO_TOKEN }} token: ${{ secrets.REPO_TOKEN }}
continue-on-error: true continue-on-error: true
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
- run: pip install pre-commit - run: pip install pre-commit
shell: bash shell: bash
- run: pre-commit autoupdate - run: pre-commit autoupdate
shell: bash shell: bash
- name: Test pre-commit - name: Test pre-commit
run: SKIP=no-commit-to-branch pre-commit run -a run: SKIP=no-commit-to-branch pre-commit run -a
- name: Commit - name: Commit
id: auto-commit-action id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: 'chore: update pre-commit hooks' commit_message: 'chore: update pre-commit hooks'
branch: ${{ env.SPECIFIC_BRANCH }} branch: ${{ env.SPECIFIC_BRANCH }}
create_branch: true create_branch: true
- name: Generate Date commit_user_name: runner
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV commit_user_email: git@horstenkamp.eu
- name: Create an PR action commit_author: runner <git@horstenkamp.eu>
if: steps.auto-commit-action.outputs.changes_detected == 'true' - name: Generate Date
uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
with: - name: Create an PR action
token: ${{ secrets.REPO_TOKEN }} if: steps.auto-commit-action.outputs.changes_detected == 'true'
branch: ${{ env.SPECIFIC_BRANCH }} uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main
title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }} with:
body: Update to the pre-commit action. token: ${{ secrets.REPO_TOKEN }}
assignees: Philipp branch: ${{ env.SPECIFIC_BRANCH }}
reviewers: Philipp title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }}
body: Update to the pre-commit action.
base_branch: ${{gitea.ref_name}}
assignees: Philipp
reviewers: Philipp