Skip to content

Commit

Permalink
ci: auto gofmt for pull request [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 3, 2023
1 parent 49bde82 commit 2adacbc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr_auto_gofmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Golang Formatter
on: [pull_request]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0

- name: Format code
uses: iamnotaturtle/auto-gofmt@v2
with:
commit_message: "style: format code with gofmt"
only_changed: True
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ output/
/daemon/
/public/dist/*
/!public/dist/README.md

.VSCodeCounter

0 comments on commit 2adacbc

Please sign in to comment.