File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Lint
2+ on :
3+ push :
4+ pull_request :
5+ workflow_dispatch :
6+
7+ permissions : {}
8+
9+ jobs :
10+ prek :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Download source
14+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
15+ with :
16+ persist-credentials : false
17+ fetch-depth : 0
18+ - uses : cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31
19+ - uses : cachix/cachix-action@3ba601ff5bbb07c7220846facfa2cd81eeee15a1 # v16
20+ with :
21+ name : devenv
22+ - name : Install devenv.sh
23+ run : nix profile install nixpkgs#devenv
24+ - name : " Download target branch: ${{ github.base_ref || 'master' }}"
25+ run : git fetch origin "${TARGET_BRANCH}"
26+ - name : Run prek hooks for changes against target branch (${{ github.base_ref || 'master' }})
27+ run : prek run --from-ref "origin/${TARGET_BRANCH}" --to-ref HEAD
28+ shell : devenv shell bash -- -e {0}
29+ if : " ${{ github.event_name != 'workflow_dispatch' }}"
30+ - name : Run prek on all files
31+ run : prek run --all-files
32+ shell : devenv shell bash -- -e {0}
33+ if : " ${{ github.event_name == 'workflow_dispatch' }}"
34+ env :
35+ TARGET_BRANCH : " ${{ github.base_ref || 'master' }}"
You can’t perform that action at this time.
0 commit comments