do not prompt before prune #166
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: Check code format | |
| on: [push, pull_request] | |
| jobs: | |
| gofmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.23' | |
| - name: Run gofmt | |
| run: | | |
| # List files that need formatting | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "The following files are not formatted:" | |
| echo "$unformatted" | |
| exit 1 # Fail the job if any files are not formatted | |
| else | |
| echo "All files are properly formatted." | |
| fi | |