Skip to content

Commit

Permalink
Polish README and workflow (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbajic authored Oct 11, 2022
1 parent 2bcc53f commit 35ec569
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/verify-action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Verify setup-buildifier-action"
name: "Verify setup-buildifier action"
concurrency:
group: ${{ github.head_ref || github.sha }}
cancel-in-progress: true
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Setup repository
uses: actions/checkout@v3

- name: Run setup-buildifier-action ${{ matrix.buildifier }}
- name: Run setup-buildifier action ${{ matrix.buildifier }}
uses: ./
with:
buildifier-version: ${{ matrix.buildifier }}
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# setup-buildifier-action

![verify-action.yml](https://github.com/jbajic/setup-buildifier-action/actions/workflows/verify-action.yml/badge.svg?event=schedule)

GitHub Action for for setting up Bazel's build tool buildifier for checking and
formatting Bazel's files format check on Bazel files using [buildifier](https://github.com/bazelbuild/buildtools) checks. This check does not format
the code but does only the verification.
formatting Bazel's files format checks on Bazel files using [buildifier](https://github.com/bazelbuild/buildtools)
checks. Works on windows, linux and macOS.

Buildifier automatically check all the files that carry one of the Bazel's
files:
Expand All @@ -12,34 +14,34 @@ files:

## Inputs

- `version` [optional]: The version of used `buildifier`
- Default: "5.1"
- Supported version: Check out [release page](https://github.com/bazelbuild/buildtools/releases) of `buildifer`

## Outputs

- `success`: Bool tells if the action has succeeded or failed.
| Name | Description | Required | Default |
| --- | --- | --- | --- |
| version | The version of the used `buildifier` | `false`| `5.1.0` |

## Example Usage

To use `setup-buildifier` you can follow presented examples to see how it
works:
To use `setup-buildifier` you can follow presented examples to see how it works:

### Check every file
```yml
name: Bazel files check
on: [push]
jobs:
formatting-check:
name: Formatting Check
name: Formatting Bazel files check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup buildifier
uses: jbajic/setup-buildifier@1
uses: jbajic/setup-buildifier@v1

- name: Run buildifier
run: |
buildifier .
buildifier -mode check -r .
```
## License
Apache-2.0

0 comments on commit 35ec569

Please sign in to comment.