-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add conventional commits and markdown linting workflows (#5)
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
'on': | ||
workflow_call: | ||
inputs: | ||
jobs_run_on: | ||
default: ubuntu-latest | ||
description: The runner group on which jobs will run. | ||
required: false | ||
type: string | ||
timeout_minutes: | ||
description: The maximum time (in minutes) for a job to run. | ||
default: 5 | ||
required: false | ||
type: number | ||
working_directory: | ||
description: The working directory where all jobs should be executed. | ||
default: '.' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
conventional-commits: | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.working_directory }} | ||
runs-on: ${{ inputs.jobs_run_on }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Validate PR title | ||
uses: 'lab42/[email protected]' | ||
with: | ||
description_regexp: '(.*)' | ||
timeout-minutes: ${{ inputs.timeout_minutes }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
'on': | ||
workflow_call: | ||
inputs: | ||
config_file: | ||
default: .markdownlint-cli2.yaml | ||
description: The configuration file to use. | ||
required: false | ||
type: string | ||
fix: | ||
default: false | ||
description: If set to true, fix any issues found. | ||
required: false | ||
type: boolean | ||
globs: | ||
default: '**/*.md' | ||
description: The glob to use to find all markdown files. | ||
required: false | ||
type: string | ||
jobs_run_on: | ||
default: ubuntu-latest | ||
description: The runner group on which jobs will run. | ||
required: false | ||
type: string | ||
separator: | ||
default: ',' | ||
description: The character used to separate globs. | ||
required: false | ||
type: string | ||
timeout_minutes: | ||
description: The maximum time (in minutes) for a job to run. | ||
default: 5 | ||
required: false | ||
type: number | ||
working_directory: | ||
description: The working directory where all jobs should be executed. | ||
default: '.' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
markdown-lint: | ||
defaults: | ||
run: | ||
working-directory: ${{ inputs.working_directory }} | ||
runs-on: ${{ inputs.jobs_run_on }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Lint Markdown files | ||
uses: DavidAnson/markdownlint-cli2-action@v13 | ||
with: | ||
config: ${{ inputs.config_file }} | ||
fix: ${{ inputs.fix }} | ||
globs: ${{ inputs.globs }} | ||
separator: ${{ inputs.separator }} | ||
timeout-minutes: ${{ inputs.timeout_minutes }} |