-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathaction.yml
More file actions
54 lines (49 loc) · 1.68 KB
/
Copy pathaction.yml
File metadata and controls
54 lines (49 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: "Conventional Commitlint"
description: "A GitHub Action to check conventional commit message"
inputs:
fail_on_error:
description: Whether to fail the workflow if commit messages don't follow conventions.
default: "true"
required: false
verbose:
description: Verbose output.
default: "false"
required: false
max_header_length:
description: "Maximum header length to check. If not specified, the header length is not checked."
required: false
token:
description: Token for fetching commits using Github API.
default: ${{ github.token }}
required: false
outputs:
status:
description: Status
value: ${{ steps.commitlint.outputs.status }}
exit_code:
description: Exit Code
value: ${{ steps.commitlint.outputs.exit_code }}
branding:
color: "red"
icon: "git-commit"
runs:
using: "composite"
steps:
- name: Install Python
# Use a specific version for action dependencies
# A commitlint action version should use fixed dependency versions (not mutable versions)
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.10"
- name: Commitlint Action
id: commitlint
run: |
python -m pip install --quiet --disable-pip-version-check -e ${GITHUB_ACTION_PATH}
python ${{ github.action_path }}/github_actions
shell: bash
env:
# NOTE: Remove once https://github.com/actions/runner/issues/665 is fixed.
INPUT_TOKEN: ${{ inputs.token }}
INPUT_FAIL_ON_ERROR: ${{ inputs.fail_on_error }}
INPUT_VERBOSE: ${{ inputs.verbose }}
INPUT_MAX_HEADER_LENGTH: ${{ inputs.max_header_length }}