You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-5Lines changed: 12 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,24 +29,31 @@ jobs:
29
29
steps:
30
30
- uses: actions/checkout@v4
31
31
- name: Run ansible-lint
32
-
uses: ansible/ansible-lint@main
32
+
uses: ansible/ansible-lint@main# or vX.X.X version
33
33
# optional (see below):
34
34
with:
35
35
args: ""
36
+
gh_action_ref: "<version - e.g. `v25.5.0`>"# Not recommended for non-composite action use
36
37
setup_python: "true"
37
38
working_directory: ""
38
39
requirements_file: ""
39
40
```
40
41
41
-
All the arguments are optional and most users should not need them:
42
+
By default, the workflow uses ansible-lint installed from `main`. For production or stable workflows, it is recommended to specify a particular release tag (in format v.X.X.X).
43
+
44
+
All the arguments are optional:
42
45
43
46
- `args`: Arguments to be passed to ansible-lint command.
47
+
- `gh_action_ref`: The git branch, tag, or commit to use for ansible-lint.
48
+
Not recommended for standard use - only use with composite actions where
49
+
`GH_ACTION_REF`is set to the parent action version.
50
+
- `requirements_file`: Path to the requirements.yml file to install role and
51
+
collection dependencies.
44
52
- `setup_python`: If python should be installed. Default is `true`.
45
53
- `working_directory`: The directory where to run ansible-lint from. Default is
46
-
`github.workspace`. That might be needed if you want to lint only a subset of
54
+
`github.workspace`. Needed if you want to lint only a subset of
47
55
your repository.
48
-
- `requirements_file`: Path to the requirements.yml file to install role and
Copy file name to clipboardExpand all lines: action.yml
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ inputs:
13
13
setup_python:
14
14
description: If false, this action will not setup python and will instead rely on the already installed python.
15
15
required: false
16
-
default: true
16
+
default: "true"
17
17
working_directory:
18
18
description: The directory where to run ansible-lint from. Default is `github.workspace`.
19
19
required: false
@@ -23,11 +23,11 @@ inputs:
23
23
required: false
24
24
default: ""
25
25
expected_return_code:
26
-
description: Expected return code from ansible-lint. Default is 0. Used for self-testing purposes.
26
+
description: (Internal use only) Expected return code from ansible-lint. Default is 0. Used for self-testing purposes.
27
27
required: false
28
28
default: "0"
29
29
gh_action_ref:
30
-
description: The branch, tag, or commit to use for ansible-lint.
30
+
description: The branch, tag, or commit to use for ansible-lint. Only recommended for use with composite actions where `GH_ACTION_REF` is set to the parent action version.
31
31
default: ""
32
32
required: false
33
33
runs:
@@ -47,10 +47,15 @@ runs:
47
47
# This allows a user to override it using the input variable
echo "::warning::Using input 'gh_action_ref': Loading ansible-lint version ${action_ref}. This input should only be used in composite actions where built-in 'GH_ACTION_REF' is set to the parent action version. If possible, use the 'uses: ansible-lint@<version>' syntax instead."
0 commit comments