GitHub Action that lints a Node based repository
jobs:
build:
steps:
- name: Lint
uses: open-turo/actions-node/lint@v5
with:
## example value for github-token provided below
github-token: ${{ secrets.GITHUB_TOKEN }}
You can specify an S3 bucket to cache node_modules in order to speed up dependency installation, in which case you will need to configure AWS credentials like so:
jobs:
build:
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- uses: open-turo/actions-node/lint@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
s3-bucket-name: <bucket-name>
s3-bucket-region: us-east-1
This action runs the following lint checks:
- action-pre-commit
- eslint via npx
- beta release check - checks for beta versions of internal dependencies
- lint-release-notes
- By default, this action will perform actions/checkout as its first step.
- This expects that
.commitlintrc.yaml
will be present to enforceconventional-commit
.
name | description | required | default |
---|---|---|---|
checkout-repo |
Perform checkout as first step of action |
false |
true |
lint-script |
Custom script to run, should be defined in package.json. |
false |
lint |
github-token |
GitHub token that can checkout the repository. e.g. 'secrets.GITHUB_TOKEN' |
true |
${{ github.token }} |
npm-auth-token |
The Node Package Manager (npm) authentication token. This token is used to authenticate against a private NPM registry configured via a .npmrc file. |
false |
"" |
npm-token |
The Node Package Manager (npm) authentication token. This token is used to authenticate against the NPM registry. |
false |
"" |
internal-dependency-prefixes |
Prefixes used to match internal dependencies and disallow beta versions. Can take comma-separated values e.g. '@turo,@example'. |
false |
"" |
s3-bucket-name |
S3 bucket name to cache node_modules to speed up dependency installation. |
false |
"" |
s3-bucket-region |
S3 bucket region to cache node_modules to speed up dependency installation. |
false |
"" |
This action is a composite
action.