Chore: Added Github Action to auto format code on push to main

Signed-off-by: jay-dee7 <jasdeepsingh.uppal@gmail.com>
This commit is contained in:
jay-dee7 2022-03-28 03:03:36 +05:30
parent 0972257eba
commit d272f4dadc
No known key found for this signature in database
GPG Key ID: 96EAA0C395FD6EB8
1 changed files with 21 additions and 0 deletions

21
.github/workflows/auto-formatter.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: gofumpt
on:
push:
branches: [main]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Auto Format code
uses: iamnotaturtle/auto-gofmt@v2.0.0
with:
only_changed: true