[V7] Change the workflow event to pull_request_target #105
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: golangci-lint | |
on: | |
push: | |
tags: | |
- "v9.*" | |
- "v8.*" | |
- "v7.*" | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- main | |
- v9 | |
- v8 | |
- v7 | |
paths-ignore: | |
- "doc/**" | |
- ".gitpod.yml" | |
- "README.md" | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.58 | |
args: -v --exclude-dirs cf --exclude-dirs fixtures --exclude-dirs plugin --exclude-dirs command/plugin | |
format: | |
name: Run go fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Set Up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
check-latest: true | |
- name: Run go fmt | |
run: go fmt && git diff --exit-code |