Skip to content

Commit 96143d6

Browse files
committed
Refactor bash and add ruby/setup-ruby action
1 parent a378e7f commit 96143d6

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
steps:
1414
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
1515
uses: actions/checkout@v6
16+
- uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: '3.4' # Not needed with a .ruby-version, .tool-versions or mise.toml
1619
- name: Install
1720
run: |
1821
python -m pip install --upgrade pip

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
description: >-
3131
Ensures that the local Ruby environment stays in sync by running 'bundle install'
3232
whenever the Gemfile or Gemfile.lock is modified.
33-
entry: bash -c 'bundle install || { echo "bundle install failed"; exit 1; }'
33+
entry: bash -c 'bundle check || bundle install || { echo "bundle install failed"; exit 1; }'
3434
language: system
3535
stages: [manual]
3636
files: ^(Gemfile|Gemfile\.lock)$
@@ -39,7 +39,7 @@ repos:
3939
description: >-
4040
Updates the ruby-advisory-db and scans Gemfile.lock for known security
4141
vulnerabilities in dependencies.
42-
entry: bash -c 'bundle exec bundle-audit update && bundle exec bundle-audit'
42+
entry: bash -c 'bundle exec bundle-audit check --update'
4343
language: system
4444
stages: [manual]
4545
files: ^Gemfile\.lock$

0 commit comments

Comments
 (0)