Skip to content

Commit 1b0090a

Browse files
authored
Merge pull request #494 from jbampton/change-to-prek-workflow
2 parents 5e16fa2 + ef86837 commit 1b0090a

1 file changed

Lines changed: 8 additions & 16 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# https://github.com/j178/prek
12
name: pre-commit
23

34
on: [pull_request]
@@ -7,26 +8,17 @@ permissions:
78

89
jobs:
910
pre-commit:
10-
name: Run pre-commit # https://pre-commit.com/
11+
name: Run pre-commit
1112
runs-on: ubuntu-latest
1213
steps:
13-
- name: Checkout Code
14+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
1415
uses: actions/checkout@v6
1516
with:
1617
persist-credentials: false
17-
- uses: actions/setup-python@v6 # https://www.python.org/
18+
- uses: ruby/setup-ruby@v1
1819
with:
19-
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
20-
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
21-
- name: Install dependencies # https://pip.pypa.io/en/stable/
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install pre-commit
25-
- name: Set PY
26-
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"
27-
- uses: actions/cache@v5
20+
ruby-version: '3.4'
21+
bundler-cache: true
22+
- uses: j178/prek-action@v2
2823
with:
29-
path: ~/.cache/pre-commit
30-
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
31-
- name: Run pre-commit
32-
run: pre-commit run --all-files
24+
extra-args: --all-files

0 commit comments

Comments
 (0)