diff --git a/.aspect/workflows/config.yaml b/.aspect/workflows/config.yaml index 2d13e3354..95edc5a27 100644 --- a/.aspect/workflows/config.yaml +++ b/.aspect/workflows/config.yaml @@ -1,5 +1,6 @@ # See https://docs.aspect.build/workflows/configuration tasks: - test: + - buildifier: notifications: - github: {} \ No newline at end of file + github: {} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 222a693db..5e8d8fb5a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,7 +6,7 @@ "steps": [ { "name": "Check out source code", - "uses": "actions/checkout@v1" + "uses": "actions/checkout@v5" }, { "name": "Installing Bazel", @@ -28,11 +28,6 @@ "name": "Gazelle", "run": "rm -f $(find . -name '*.pb.go' | sed -e 's/[^/]*$/BUILD.bazel/') && bazel run //:gazelle" }, - { - "if": "matrix.host.lint", - "name": "Buildifier", - "run": "bazel run @com_github_bazelbuild_buildtools//:buildifier" - }, { "if": "matrix.host.lint", "name": "Gofmt", diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml index 35dfa7291..86a2cae8e 100644 --- a/.github/workflows/pull-requests.yaml +++ b/.github/workflows/pull-requests.yaml @@ -6,7 +6,7 @@ "steps": [ { "name": "Check out source code", - "uses": "actions/checkout@v1" + "uses": "actions/checkout@v5" }, { "name": "Installing Bazel", @@ -28,11 +28,6 @@ "name": "Gazelle", "run": "rm -f $(find . -name '*.pb.go' | sed -e 's/[^/]*$/BUILD.bazel/') && bazel run //:gazelle" }, - { - "if": "matrix.host.lint", - "name": "Buildifier", - "run": "bazel run @com_github_bazelbuild_buildtools//:buildifier" - }, { "if": "matrix.host.lint", "name": "Gofmt", diff --git a/BUILD.bazel b/BUILD.bazel index 11d18a169..e0fcc7cfb 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -25,6 +25,13 @@ buildifier( name = "buildifier", ) +buildifier( + name = "buildifier.check", + exclude_patterns = ["./.git/*"], + lint_mode = "warn", + mode = "diff", +) + npm_link_all_packages( name = "node_modules", ) diff --git a/tools/container.bzl b/tools/container.bzl index 3f33c42a5..3e2824d5a 100644 --- a/tools/container.bzl +++ b/tools/container.bzl @@ -1,3 +1,4 @@ +"Utilities for building and pushing container images for all target platforms." load("@rules_oci//oci:defs.bzl", "oci_image", "oci_image_index", "oci_push") load("@rules_pkg//pkg:tar.bzl", "pkg_tar") diff --git a/tools/github_workflows/workflows_template.libsonnet b/tools/github_workflows/workflows_template.libsonnet index a1954d152..4ffcaadab 100644 --- a/tools/github_workflows/workflows_template.libsonnet +++ b/tools/github_workflows/workflows_template.libsonnet @@ -67,7 +67,7 @@ // https://github.com/GoogleCloudPlatform/container-definitions/issues/12037 { name: 'Check out source code', - uses: 'actions/checkout@v1', + uses: 'actions/checkout@v5', }, ] + setupSteps + [ { @@ -91,11 +91,6 @@ run: "rm -f $(find . -name '*.pb.go' | sed -e 's/[^/]*$/BUILD.bazel/') && bazel run //:gazelle", 'if': 'matrix.host.lint', }, - { - name: 'Buildifier', - run: 'bazel run @com_github_bazelbuild_buildtools//:buildifier', - 'if': 'matrix.host.lint', - }, { name: 'Gofmt', run: 'bazel run @cc_mvdan_gofumpt//:gofumpt -- -w -extra $(pwd)',