From 09e91231c4c0733e12e944b593523e6a9a2908a4 Mon Sep 17 00:00:00 2001 From: Aaron Zielstorff Date: Thu, 8 Aug 2024 08:52:25 +0000 Subject: [PATCH] Updates go format action --- .github/workflows/go-formatting.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go-formatting.yml b/.github/workflows/go-formatting.yml index 6c1c044..d1cf30f 100644 --- a/.github/workflows/go-formatting.yml +++ b/.github/workflows/go-formatting.yml @@ -16,21 +16,20 @@ jobs: uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: '1.22.5' - name: Run GoFmt id: gofmt-run run: | - if ! gofmt -d backend/aashub/ > gofmt_output.txt; then - echo "Formatting issues found" + gofmt -d backend/aashub/ > gofmt_output.txt + if [ -s gofmt_output.txt ]; then + echo "Formatting issues found:" cat gofmt_output.txt exit 1 fi - name: GoFmt Output - if: ${{ failure() }} - run: | - echo "The following files are not formatted:" - cat gofmt_output.txt \ No newline at end of file + if: failure() + run: echo "Check formatting issues in the logs."