File tree 3 files changed +38
-20
lines changed
actions/ansible_validate_changelog
3 files changed +38
-20
lines changed Original file line number Diff line number Diff line change
1
+ name : ansible_validate_changelog
2
+ description : Ensure a valid changelog has been added to the pull request.
3
+
4
+ inputs :
5
+ path :
6
+ description : |
7
+ Path to the collection to validate changelog from.
8
+ required : false
9
+ default : " ."
10
+ base_ref :
11
+ description : The pull request base ref.
12
+ required : false
13
+ default : ${{ github.event.pull_request.base.ref }}
14
+
15
+ runs :
16
+ using : composite
17
+ steps :
18
+ - name : Setup python
19
+ uses : actions/setup-python@v4
20
+ with :
21
+ python-version : " 3.9"
22
+
23
+ - name : Install python dependencies
24
+ run : |
25
+ pip install -U pyyaml
26
+ shell : bash
27
+
28
+ - name : Validate changelog
29
+ run : >-
30
+ python3 ${{ github.action_path }}/validate_changelog.py
31
+ --ref ${{ inputs.base_ref }}
32
+ shell : bash
33
+ working-directory : ${{ inputs.path }}
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ def is_module_or_plugin(ref: str) -> bool:
54
54
"plugins/terminal" ,
55
55
"plugins/test" ,
56
56
"plugins/vars" ,
57
+ "roles/" ,
58
+ "playbooks/" ,
59
+ "meta/runtime.yml" ,
57
60
)
58
61
return ref .startswith (prefix_list )
59
62
Original file line number Diff line number Diff line change 6
6
runs-on : ubuntu-latest
7
7
name : Require a changelog
8
8
if : " !contains(github.event.pull_request.labels.*.name, 'skip-changelog')"
9
- env :
10
- PY_COLORS : " 1"
11
- source_directory : " ./source"
12
9
steps :
13
10
- name : Checkout the collection repository
14
11
uses : actions/checkout@v3
15
12
with :
16
- path : ${{ env.source_directory }}
17
13
ref : ${{ github.event.pull_request.head.sha }}
18
14
fetch-depth : " 0"
19
15
20
- - name : setup python
21
- uses : actions/setup-python@v4
22
- with :
23
- python-version : " 3.9"
24
-
25
- - name : Download python script
26
- run : curl -o /tmp/validate_changelog.py https://raw.githubusercontent.com/ansible-network/github_actions/main/scripts/validate_changelog.py
27
-
28
- - name : Install python required libraries
29
- run : pip install -U pyyaml
30
-
31
- - name : Ensure a valid changelog entry exists
32
- run : >-
33
- python /tmp/validate_changelog.py
34
- --ref ${{ github.event.pull_request.base.ref }}
35
- working-directory : ${{ env.source_directory }}
16
+ - name : Validate changelog
17
+ uses : ansible-network/github_actions/.github/actions/ansible_validate_changelog@main
You can’t perform that action at this time.
0 commit comments