Set default value to commiter and reviewer #16
@ -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: ${{ vars.ASSIGNEES }}
|
||||||
|
reviewers: ${{ vars.REVIEWERS }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user