From d272f4dadc705683992e33123d0f8574c0bb8ea4 Mon Sep 17 00:00:00 2001 From: jay-dee7 Date: Mon, 28 Mar 2022 03:03:36 +0530 Subject: [PATCH] Chore: Added Github Action to auto format code on push to main Signed-off-by: jay-dee7 --- .github/workflows/auto-formatter.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/auto-formatter.yml diff --git a/.github/workflows/auto-formatter.yml b/.github/workflows/auto-formatter.yml new file mode 100644 index 0000000..c411b58 --- /dev/null +++ b/.github/workflows/auto-formatter.yml @@ -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