github.com/sagernet/sing-box@v1.2.7/.github/workflows/lint.yml (about) 1 name: Lint 2 3 on: 4 push: 5 branches: 6 - main-next 7 - dev-next 8 paths-ignore: 9 - '**.md' 10 - '.github/**' 11 - '!.github/workflows/lint.yml' 12 pull_request: 13 branches: 14 - main-next 15 - dev-next 16 17 jobs: 18 build: 19 name: Build 20 runs-on: ubuntu-latest 21 steps: 22 - name: Checkout 23 uses: actions/checkout@v3 24 with: 25 fetch-depth: 0 26 - name: Get latest go version 27 id: version 28 run: | 29 echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT 30 - name: Setup Go 31 uses: actions/setup-go@v4 32 with: 33 go-version: ${{ steps.version.outputs.go_version }} 34 - name: golangci-lint 35 uses: golangci/golangci-lint-action@v3 36 with: 37 version: latest