diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 97551fc77e..c955a0bd94 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -15,6 +15,8 @@ # specific language governing permissions and limitations # under the License. +--- +# https://github.com/j178/prek name: pre-commit on: [pull_request] @@ -22,10 +24,6 @@ on: [pull_request] permissions: contents: read -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} - jobs: pre-commit: name: Run pre-commit @@ -35,20 +33,6 @@ jobs: uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - - name: Setup Python - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: '3.13' - architecture: 'x64' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pre-commit - - name: set PY - run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV" - - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 + - uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - name: Run pre-commit - run: pre-commit run --all-files + extra-args: --all-files