name: Lint on: push: branches: - main pull_request: branches: - main permissions: read-all jobs: golangci-lint: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: show-progress: false - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version-file: go.ver cache-dependency-path: tools/golangci-lint/go.sum - name: Lint code run: make lint format: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: show-progress: false - name: Set up Go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: go-version-file: go.ver cache-dependency-path: tools/golangci-lint/go.sum - name: Format code run: make format - name: Check for local changes run: git diff --exit-code