From a69b16bfcf7e4d4fba8cc4418966e0f7301c1e67 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Wed, 18 Oct 2023 15:49:34 -0700 Subject: [PATCH] chore: update buildifier targets used by Aspect Workflows (#629) --- .github/workflows/buildifier.yaml | 20 -------------------- BUILD.bazel | 12 +++++++++--- 2 files changed, 9 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/buildifier.yaml diff --git a/.github/workflows/buildifier.yaml b/.github/workflows/buildifier.yaml deleted file mode 100644 index fb60469..0000000 --- a/.github/workflows/buildifier.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Buildifier - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [main] - pull_request: - branches: [main] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: buildifier - run: bazel run --enable_bzlmod //:buildifier.check diff --git a/BUILD.bazel b/BUILD.bazel index ddbd886..07e5eaa 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -41,11 +41,17 @@ gazelle( command = "update-repos", ) +buildifier( + name = "buildifier", + exclude_patterns = ["./.git/*"], + lint_mode = "fix", + mode = "fix", + tags = ["manual"], # tag as manual so windows ci does not build it by default +) + buildifier( name = "buildifier.check", - exclude_patterns = [ - "./.git/*", - ], + exclude_patterns = ["./.git/*"], lint_mode = "warn", mode = "diff", tags = ["manual"], # tag as manual so windows ci does not build it by default