Reworked the maintance action to use a PAT
This commit is contained in:
parent
e7678a5f66
commit
4951253d52
@ -5,15 +5,26 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- .gitea/workflows/maintenance.yaml
|
- .gitea/workflows/maintenance.yaml
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 1 * * 0
|
- 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:
|
||||||
|
SPECIFIC_BRANCH: chore/update-pre-commit
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.REPO_TOKEN }}
|
||||||
|
- name: Attempt to checkout specific branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ env.SPECIFIC_BRANCH }}
|
||||||
|
token: ${{ secrets.REPO_TOKEN }}
|
||||||
|
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
|
||||||
@ -26,18 +37,16 @@ jobs:
|
|||||||
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: update/pre-commit-hooks
|
branch: ${{ env.SPECIFIC_BRANCH }}
|
||||||
push_options: --force
|
|
||||||
create_branch: true
|
create_branch: true
|
||||||
- name: Generate Date
|
- name: Generate Date
|
||||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
||||||
- run: echo "${{steps.auto-commit-action.outputs.changes_detected}}"
|
|
||||||
- name: Create an PR action
|
- name: Create an PR action
|
||||||
if: steps.auto-commit-action.outputs.changes_detected == 'true'
|
if: steps.auto-commit-action.outputs.changes_detected == 'true'
|
||||||
uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main
|
uses: https://git.horstenkamp.eu/Philipp/gitea-act-create-pr@main
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.REPO_TOKEN }}
|
token: ${{ secrets.REPO_TOKEN }}
|
||||||
branch: update/pre-commit-hooks
|
branch: ${{ env.SPECIFIC_BRANCH }}
|
||||||
title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }}
|
title: Updates to the pre-commit action created at ${{ env.CURRENT_DATE }}
|
||||||
body: Update to the pre-commit action.
|
body: Update to the pre-commit action.
|
||||||
assignees: Philipp
|
assignees: Philipp
|
||||||
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/node_modules/.cache
|
Loading…
x
Reference in New Issue
Block a user