File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Run pre-commit
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ commands :
7+ required : false
8+ type : string
9+ default : " "
10+ description : run additional commands for preparing the environment
11+
12+ jobs :
13+ pre-commit :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-python@v5
18+ id : python-setup
19+ with :
20+ python-version : ' 3.x'
21+ - name : Run commands
22+ if : inputs.commands
23+ run : ${{ inputs.commands }}
24+ - name : Cache pre-commit environments
25+ uses : actions/cache@v4
26+ with :
27+ path : ' ~/.cache/pre-commit'
28+ key : pre-commit-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
29+ - run : pipx run pre-commit run --show-diff-on-failure --color=always --all-files
You can’t perform that action at this time.
0 commit comments