Skip to content

Commit

Permalink
ci: add fmt lint
Browse files Browse the repository at this point in the history
- Add GitHub Action for formatting code though autofix-ci/action.
  • Loading branch information
Taowyoo committed Apr 26, 2024
1 parent e6ec3c4 commit 514a708
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.18'
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Build
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/lint-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: autofix.ci

on:
pull_request:
branches:
- master

permissions:
contents: read

jobs:
gofmt:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"

- run: gofmt -w -s .

- uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84

0 comments on commit 514a708

Please sign in to comment.