-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathaction.yml
48 lines (43 loc) · 1.28 KB
/
action.yml
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
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
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
uses: actions/[email protected]
with:
python-version: '3.8'
- 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 }}