From 59b20fbfdfc41b7fe74fe6a3ccd8fb1a6b2726d2 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sat, 4 Apr 2026 15:30:11 +1000 Subject: [PATCH] [CI] Change to prek action workflows --- .github/workflows/pre-commit-manual.yml | 26 +++++++++++++++++++++++++ .github/workflows/pre-commit.yml | 14 +++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/pre-commit-manual.yml diff --git a/.github/workflows/pre-commit-manual.yml b/.github/workflows/pre-commit-manual.yml new file mode 100644 index 00000000..df26d133 --- /dev/null +++ b/.github/workflows/pre-commit-manual.yml @@ -0,0 +1,26 @@ +# https://github.com/j178/prek +name: Manual hooks + +on: [pull_request] + +permissions: + contents: read + +jobs: + pre-commit: + name: 🏃‍♂️‍➡️ prek on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + - name: Run prek-action + uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1 + with: + install-only: true + - name: Run manual prek hooks + run: prek run --all-files --hook-stage manual diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 16ce4648..43d74ed6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,22 +1,24 @@ -name: pre-commit +# https://github.com/j178/prek +name: Standard hooks + +on: [pull_request] permissions: contents: read -on: [pull_request] - jobs: pre-commit: - name: 🏃🏼 Pre-commit on ${{ matrix.os }} + name: 🏃🏿‍♂️‍➡️ Run prek on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest] steps: - - name: Checkout Code + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: - fetch-depth: 0 persist-credentials: false - name: Run prek-action uses: j178/prek-action@53276d8b0d10f8b6672aa85b4588c6921d0370cc # v2.0.1 + with: + extra-args: --all-files