Skip to content

Update actions/checkout action to v4.1.3 #33

Update actions/checkout action to v4.1.3

Update actions/checkout action to v4.1.3 #33

Workflow file for this run

---
name: "Pre-commit"
on: # yamllint disable-line rule:truthy
push:
branches:
- main
tags: ["*"]
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
# https://github.com/actions/checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Set up Python
id: setup-py
# https://github.com/actions/setup-python
# yamllint disable-line rule:line-length
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: "3.12"
- name: Enable cache for pre-commit hooks
# https://github.com/actions/cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cache/pre-commit
# yamllint disable-line rule:line-length
key: pre-commit|${{ steps.setup-py.outputs.python-version}}|${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit|${{ steps.setup-py.outputs.python-version}}|
pre-commit|
- name: Run pre-commit checks
run: pipx run pre-commit run -a
- name: Run pre-commit gc
run: pipx run pre-commit gc