From bd71304e578c2651329773d2702541b8b173e6d0 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:34:15 +0200 Subject: [PATCH] simplify pre-commit --- .github/workflows/pre_commit.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index e15cbc1..9987dc7 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -1,24 +1,26 @@ -name: "DSO lint" on: push: branches: [main] pull_request: + branches: [main] + +name: pre-commit jobs: - pre_commit: - name: "pre-commit" + pre-commit: + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - - uses: pre-commit/action@v2.0.3 - uses: stefanzweifel/git-auto-commit-action@v5 if: '!cancelled()' + with: + commit_message: pre-commit autofixes