This repository was archived by the owner on Jul 26, 2025. It is now read-only.
Fix CI #249
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go Formatting Check | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - latest | |
| - stable | |
| pull_request: | |
| branches: | |
| - latest | |
| - stable | |
| jobs: | |
| go-fmt-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: "1.22" | |
| - name: Check Go format | |
| run: | | |
| files=$(gofmt -l .) | |
| if [ -n "$files" ]; then | |
| echo "Following files arent formatted:" | |
| echo "$files" | |
| exit 1 | |
| else | |
| echo "Everything is formatted." | |
| fi |