Command err handling #1403
Workflow file for this run
This file contains 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: lint | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
- uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
with: | |
only-new-issues: true | |
tidy: | |
name: Remain 'go mod tidy' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.x | |
- name: Verify tidyness | |
run: | | |
go mod tidy | |
if ! git diff --quiet go.mod go.sum; then | |
echo "'go mod tidy' resulted in changes:" | |
git diff go.mod go.sum | |
echo "Please commit these changes." | |
fi |