diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index a9429567..3cbb75ed 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -4,7 +4,7 @@ on: pull_request: branches: [main] # milestoned is added here as a workaround for release-please not triggering PR workflows (PRs should be added to a milestone to trigger the workflow). - types: [milestoned, opened, reopened, synchronize] + types: [milestoned, opened, reopened, synchronize, edit] permissions: contents: read diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 00000000..010853d7 --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,26 @@ +name: golangci-lint +on: + pull_request: + branches: + - main + types: [milestoned, opened, reopened, synchronize] + +permissions: + contents: read + pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + + - name: Setup golang + uses: ./.github/actions/golang + + - name: golangci-lint + uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 + with: + args: --timeout=5m \ No newline at end of file diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 00000000..84b4b853 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,6 @@ +linters: + # all default linters enabled + enable: + - gofmt + - goimports + - prealloc