diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 10c7ee5813b..3d177a5cb86 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] @@ -29,19 +31,12 @@ concurrency: jobs: pre-commit: name: Run pre-commit - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - - name: Check Out - uses: actions/checkout@v6 - - name: Install - run: | - python -m pip install --upgrade pip - pip install -r requirements-dev.txt - - name: Set PY - run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - - uses: actions/cache@v5 + - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - name: Run pre-commit - run: pre-commit run --color=always --all-files + persist-credentials: false + - uses: j178/prek-action@1382ad72dea72f9d53832f2bcb65b3e87a947204 # v3.0.1 + with: + extra-args: --all-files