diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c427e18..7add813 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -13,4 +13,13 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.10" + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: | + pre-commit-${{ runner.os }}- - uses: pre-commit/action@v3.0.1 + env: + SKIP: ${{ github.ref == 'refs/heads/main' && 'no-commit-to-branch' || '' }}