Skip to content

Commit e1ec741

Browse files
chore(bazel): add bazel .lock to pre-commit (#585)
1 parent 36c9ddf commit e1ec741

3 files changed

Lines changed: 14 additions & 33 deletions

File tree

.github/workflows/bzlmod-lock.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# SPDX-License-Identifier: Apache-2.0
1212
# *******************************************************************************
1313

14-
name: Linting Checks
14+
name: PR Checks
1515

1616
on:
1717
pull_request:
@@ -20,21 +20,22 @@ on:
2020
types: [checks_requested]
2121

2222
jobs:
23-
lint:
23+
pre-commit:
24+
name: Run pre-commit checks
2425
runs-on: ubuntu-latest
25-
continue-on-error: true
2626
steps:
2727

2828
- name: 🛡️ Harden Runner
2929
if: github.repository_owner == 'eclipse-score'
3030
uses: step-security/harden-runner@v2.18.0
3131
with:
3232
egress-policy: audit
33+
3334
- name: Checkout repository
34-
uses: actions/checkout@v4.2.2
35+
uses: actions/checkout@v6
3536

3637
- name: Setup Bazel
37-
uses: bazel-contrib/setup-bazel@0.15.0
38+
uses: bazel-contrib/setup-bazel@0.19.0
3839
with:
3940
disk-cache: true
4041
repository-cache: true

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ repos:
3535
language: system
3636
pass_filenames: false
3737
files: '(^|/)(MODULE\.bazel|.*\.bzl|BUILD(\.bazel)?)$'
38+
39+
- id: bzlmod-lockfile
40+
name: bazel mod deps lockfile check
41+
entry: bazel mod deps --lockfile_mode=error
42+
language: system
43+
pass_filenames: false
44+
files: '(^|/)MODULE\.bazel(\.lock)?$'
45+
3846
- id: actionlint
3947
name: actionlint
4048
# Disable shellcheck and pyflakes for now, to enforce consistent behavior.

0 commit comments

Comments
 (0)