Skip to content

Commit

Permalink
Merge branch 'main' into renovate/actions-checkout-4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
psalaberria002 authored Nov 14, 2023
2 parents 192a98c + 4ab7468 commit 3dc616f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ jobs:
path: "/home/runner/.cache/bazel"
key: bazel

- name: Gazelle
run: |
bazel run //:gazelle-update-repos
bazel run //:gazelle_check
if git diff --exit-code snapshots/dependencies.bzl ; then
echo "Gazelle repos are up to date."
else
echo "Gazelle repos aren't up to date. Run 'bazel run //:gazelle-update-repos' locally, and commit the changes."
exit 1
fi
- name: Build
run: |
bazel build //...
Expand Down
10 changes: 10 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ load("@bazel_gazelle//:def.bzl", "gazelle")
# gazelle:proto disable_global
gazelle(name = "gazelle")

# Gazelle check: exits with 1 if gazelle wants to make changes.
#
# Usage:
# bazel run gazelle_check
gazelle(
name = "gazelle_check",
command = "update",
extra_args = ["-mode=diff"],
)

gazelle(
name = "gazelle-update-repos",
args = [
Expand Down

0 comments on commit 3dc616f

Please sign in to comment.