Skip to content

Commit a1ffaa6

Browse files
committed
Don't use pre-commit/action
1 parent 2fffd44 commit a1ffaa6

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

.github/workflows/pre-commit.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,35 @@
11
name: pre-commit
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
- cron: "0 7 * * *" # Run once daily
8+
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
defaults:
13+
run:
14+
shell: bash -l {0}
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
419

520
jobs:
621
pre-commit:
722
runs-on: ubuntu-latest
823
steps:
924
- uses: actions/checkout@v4
10-
- uses: actions/setup-python@v3
11-
- uses: pre-commit/action@v3
25+
- uses: conda-incubator/setup-miniconda@v3
26+
with:
27+
miniforge-variant: Miniforge3
28+
miniforge-version: latest
29+
activate-environment: dev
30+
environment-file: ops/conda_env/pre-commit.yml
31+
use-mamba: true
32+
- name: Update pre-commit hooks
33+
run: |
34+
pre-commit install
35+
pre-commit run --all-files

0 commit comments

Comments
 (0)