name: golangci-lint on: push: branches: [ main, release-** ] pull_request: branches: [ main, release-** ] workflow_dispatch: env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} EXCLUDE_ENTERPRISE: true jobs: golangci: name: plugin runs-on: ubuntu-18.04 steps: - uses: actions/setup-go@v3 with: go-version: 1.18.1 - uses: actions/checkout@v3 with: path: "focalboard" - id: "mattermostServer" uses: actions/checkout@v3 continue-on-error: true with: repository: "mattermost/mattermost-server" fetch-depth: "20" path: "mattermost-server" ref: ${{ env.BRANCH_NAME }} - uses: actions/checkout@v3 if: steps.mattermostServer.outcome == 'failure' with: repository: "mattermost/mattermost-server" fetch-depth: "20" path: "mattermost-server" ref : "master" - name: set up golangci-lint run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2 - name: lint run: | cd focalboard make server-lint