diff --git a/.github/workflows/pre-commit-auto-update.yml b/.github/workflows/pre-commit-auto-update.yml new file mode 100644 index 00000000..5c766196 --- /dev/null +++ b/.github/workflows/pre-commit-auto-update.yml @@ -0,0 +1,25 @@ +name: Pre-commit auto-update +on: # yamllint disable-line rule:truthy + schedule: + - cron: 0 0 1 * * +jobs: + auto-update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + - name: Install pre-commit + run: pip install pre-commit + - name: Run pre-commit autoupdate + run: pre-commit autoupdate + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: update/pre-commit-autoupdate + title: Auto-update pre-commit hooks + commit-message: Auto-update pre-commit hooks + body: | + Update pre-commit hooks to latest version + labels: dependencies diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c6226fbb..3458e378 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -12,13 +12,13 @@ repos: hooks: - id: yamllint - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v19.1.4 hooks: - id: clang-format types_or: [c++, c] args: [-i, --style=file] - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.9.2 + rev: v0.15.0 hooks: - id: markdownlint-cli2-rules-docker - repo: https://github.com/codespell-project/codespell