pre-commit / action

a GitHub action to run `pre-commit`
MIT License
463 stars 145 forks source link

Hook fails when upgrading from ubuntu-22.04 to ubuntu-24.04 #214

Closed epgui closed 1 month ago

epgui commented 1 month ago

I have the following Github Actions config:

  check-pre-commit-hooks:
    runs-on: ubuntu-22.04
    steps:
      - name: GitHub Checkout
        uses: actions/checkout@v4
      - name: Check other pre-commit hooks
        uses: pre-commit/action@v3.0.1
        env:
          SKIP: no-commit-to-branch,terraform_fmt
        with:
          extra_args: --all-files --show-diff-on-failure

This runs successfully without problem. However, when I upgrade the ubuntu version as follows...

  check-pre-commit-hooks:
    runs-on: ubuntu-24.04
    # ...

... I get the following error:

Screenshot 2024-10-11 at 11 15 20 AM
epgui commented 1 month ago

Ah, it looks like the issue goes away when I add a actions/setup-python@v3 step as the documentation currently recommends.

asottile commented 1 month ago

you are the third or fourth person to not search before creating an issue for this specific thing. please do better!