GitHub Action that lints a golang based repository via action-pre-commit
jobs:
build:
steps:
- name: Lint
uses: open-turo/actions-go/lint@v1
with:
## example value for github-token provided below
github-token: ${{ secrets.GITHUB_TOKEN }}
parameter | description | required | default |
---|---|---|---|
checkout-repo | Perform checkout as first step of action | false |
true |
github-token | GitHub token that can checkout the consumer repository. e.g. 'secrets.GITHUB_TOKEN' | true |
This action is an composite
action.
This action runs the following lint checks:
- By default, this action will perform actions/checkout as its first step.
- If the consumer repository has a
package-lock.json
:- It will execute
npm ci
before running thepre-commit
step.
- It will execute
- This expects that
.commitlintrc.yaml
will be present at the root level of the consumer repository to enforceconventional-commit
.