ci: GitHub action for code linting (#6)
This commit is contained in:
commit
42e8bf77ad
13
.github/workflows/conventional-commits.yml
vendored
13
.github/workflows/conventional-commits.yml
vendored
@ -4,12 +4,21 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, synchronize, reopened, edited ]
|
types: [ opened, synchronize, reopened, edited ]
|
||||||
|
|
||||||
|
permissions: { }
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: conventional commits
|
name: conventional commits
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: checkout code
|
||||||
- uses: webiny/action-conventional-commits@v1.3.0
|
uses: actions/checkout@v3
|
||||||
|
- name: conventional commits check
|
||||||
|
uses: webiny/action-conventional-commits@v1.3.0
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
12
.github/workflows/conventional-pull-requests.yml
vendored
12
.github/workflows/conventional-pull-requests.yml
vendored
@ -4,11 +4,19 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
types: [ opened, synchronize, reopened, edited ]
|
types: [ opened, synchronize, reopened, edited ]
|
||||||
|
|
||||||
|
permissions: { }
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-pr-title:
|
build:
|
||||||
|
name: conventional pull requests
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- name: PR Conventional Commit Validation
|
- name: conventional pull requests check
|
||||||
uses: ytanikin/PRConventionalCommits@1.1.0
|
uses: ytanikin/PRConventionalCommits@1.1.0
|
||||||
with:
|
with:
|
||||||
task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]'
|
task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]'
|
||||||
|
37
.github/workflows/lint.yml
vendored
Normal file
37
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [ opened, synchronize, reopened, edited ]
|
||||||
|
|
||||||
|
permissions: { }
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: read
|
||||||
|
packages: read
|
||||||
|
statuses: write
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
# Super-linter needs the full git history to get the list of files that changed across commits
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Super-linter check
|
||||||
|
uses: super-linter/super-linter@v6.9.0 # x-release-please-version
|
||||||
|
env:
|
||||||
|
# to report GitHub Actions status checks
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
VALIDATE_ALL_CODEBASE: false
|
||||||
|
FIX_CSS_PRETTIER: true
|
||||||
|
FIX_HTML_PRETTIER: true
|
||||||
|
FIX_JAVASCRIPT_ES: true
|
||||||
|
FIX_JSON_PRETTIER: true
|
||||||
|
FIX_RUST_2021: true
|
||||||
|
FIX_RUST_CLIPPY: true
|
||||||
|
FIX_TYPESCRIPT_ES: true
|
||||||
|
FIX_YAML_PRETTIER: true
|
Loading…
x
Reference in New Issue
Block a user