diff --git a/.github/workflows/gofmt.yml b/.github/workflows/gofmt.yml
new file mode 100644
index 000000000..4c073c9b8
--- /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