From 454381c0c023109b5cb43af7e58465c696861309 Mon Sep 17 00:00:00 2001 From: Aadhav Vignesh <53528139+burntcarrot@users.noreply.github.com> Date: Wed, 14 Jul 2021 10:10:06 +0530 Subject: [PATCH] ci: add gofmt action (#50) --- .github/workflows/gofmt.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/gofmt.yml diff --git a/.github/workflows/gofmt.yml b/.github/workflows/gofmt.yml new file mode 100644 index 0000000..4c073c9 --- /dev/null +++ b/.github/workflows/gofmt.yml @@ -0,0 +1,20 @@ +name: "gofmt" + +on: [ push,pull_request ] + +jobs: + gofmt: + name: gofmt + runs-on: ubuntu-latest + + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: "1.15" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Format + run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi