diff --git a/.github/workflows/pre-commit-manual.yml b/.github/workflows/pre-commit-manual.yml new file mode 100644 index 0000000..df26d13 --- /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 16ce464..43d74ed 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