forked from bazelRio/bazelRio
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 859 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Lint and Format
on: [pull_request, push]
jobs:
wpiformat:
name: "buildifier"
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15.x
uses: actions/setup-go@v2
with:
go-version: 1.15.x
id: go
- uses: actions/checkout@v2
- name: Install Buildifier
run: |
cd $(mktemp -d)
GO111MODULE=on go get github.com/bazelbuild/buildtools/[email protected]
- name: Run buildifier
run: buildifier --lint=fix -r .
- name: Check Output
run: git --no-pager diff --exit-code HEAD
- name: Generate diff
run: git diff HEAD > buildifier-fixes.patch
if: ${{ failure() }}
- uses: actions/upload-artifact@v2
with:
name: buildifier fixes
path: buildifier-fixes.patch
if: ${{ failure() }}