You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Run buildifier
v1.0.0
GitHub Action for running Bazel's build tool buildifier. Works on windows, linux and macOS.
Buildifier automatically checks one of the Bazel's files:
BUILD
WORKSPACE
.bzl
Name | Description | Required | Default |
---|---|---|---|
version | The version of the used buildifier |
false |
5.1.0 |
path | The path on which to run buildifier check. | false |
. |
mode | The mode in which to run buildifier [check|diff] |
false |
check |
To use buildifier
action you can follow presented examples to see how it works:
name: Bazel files check
on: [push]
jobs:
formatting-check:
name: Run buildifier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run buildifier
uses: jbajic/buildifier@v1
name: Check bazel files
on: [push]
jobs:
formatting-check:
name: Run buildifier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run buildifier
uses: jbajic/buildifier@v1
with:
path: src
name: Check bazel files
on: [push]
jobs:
formatting-check:
name: Run buildifier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run buildifier
uses: jbajic/buildifier@v1
with:
path: src
mode: diff
To print out the diff two steps will be performed:
- Run buildifier in
multi_diff
mode, - Run
git diff
and print out the changes.
Apache-2.0