Merge upstream v2.4.2 (Go 1.26.2 + logrus CVE fixes) #15
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: Code formatting | |
| on: | |
| pull_request: | |
| branches: [ "main" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| format: | |
| name: gofmt validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: gofmt | |
| run: | | |
| unformatted=$(gofmt -s -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "Gofmt validation failed. The following files need formatting:" | |
| echo "$unformatted" | |
| echo "" | |
| echo "Run 'gofmt -s -w .' locally and commit the result." | |
| exit 1 | |
| fi |