File tree Expand file tree Collapse file tree 5 files changed +31
-6
lines changed
actions/build_install_collection Expand file tree Collapse file tree 5 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 79
79
working-directory : ${{ inputs.source_path }}
80
80
81
81
- name : Install collection and dependencies
82
- run : ansible-galaxy collection install ./${{ steps.identify.outputs.tar_file || inputs.tar_file }} -p /home/runner/collections
82
+ run : ansible-galaxy collection install ./${{ steps.identify.outputs.tar_file || inputs.tar_file }} --pre - p /home/runner/collections
83
83
shell : bash
84
84
working-directory : ${{ inputs.source_path }}
85
85
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Integration tests
2
2
on :
3
3
workflow_call :
4
4
inputs :
5
+ collection_pre_install :
6
+ required : false
7
+ type : string
8
+ default : " "
5
9
cml_lab :
6
10
default : tests/integration/labs/single.yaml
7
11
required : false
72
76
- name : Install ansible-core (${{ matrix.ansible-version }})
73
77
run : python3 -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
74
78
79
+ - name : Pre install collections dependencies first so the collection install does not
80
+ run : ansible-galaxy collection install --pre ${{ inputs.collection_pre_install }} -p /home/runner/collections
81
+ if : inputs.collection_pre_install != ''
82
+
75
83
- name : Read collection metadata from galaxy.yml
76
84
id : identify
77
85
uses : ansible-network/github_actions/.github/actions/identify_collection@main
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Sanity tests
2
2
on :
3
3
workflow_call :
4
4
inputs :
5
+ collection_pre_install :
6
+ required : false
7
+ type : string
8
+ default : " "
5
9
matrix_exclude :
6
10
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
7
11
# 2.9 supports Python 3.5-3.8
@@ -144,6 +148,10 @@ jobs:
144
148
- name : Install ansible-core (${{ matrix.ansible-version }})
145
149
run : python3 -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
146
150
151
+ - name : Pre install collections dependencies first so the collection install does not
152
+ run : ansible-galaxy collection install --pre ${{ inputs.collection_pre_install }} -p /home/runner/collections/
153
+ if : inputs.collection_pre_install != ''
154
+
147
155
- name : Read collection metadata from galaxy.yml
148
156
id : identify
149
157
uses : ansible-network/github_actions/.github/actions/identify_collection@main
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ name: Unit tests, dependencies from galaxy
2
2
on :
3
3
workflow_call :
4
4
inputs :
5
+ collection_pre_install :
6
+ required : false
7
+ type : string
8
+ default : " "
5
9
matrix_exclude :
6
10
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
7
11
# 2.9 supports Python 3.5-3.8
@@ -137,6 +141,10 @@ jobs:
137
141
- name : Install ansible-core (${{ matrix.ansible-version }})
138
142
run : python3 -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
139
143
144
+ - name : Pre install collections dependencies first so the collection install does not
145
+ run : ansible-galaxy collection install --pre ${{ inputs.collection_pre_install }} -p /home/runner/collections
146
+ if : inputs.collection_pre_install != ''
147
+
140
148
- name : Read collection metadata from galaxy.yml
141
149
id : identify
142
150
uses : ansible-network/github_actions/.github/actions/identify_collection@main
Original file line number Diff line number Diff line change 3
3
workflow_call :
4
4
inputs :
5
5
collection_pre_install :
6
- required : true
6
+ required : false
7
7
type : string
8
+ default : " "
8
9
matrix_exclude :
9
10
# https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
10
11
# 2.12 supports Python 3.8-3.10
@@ -86,16 +87,16 @@ jobs:
86
87
- name : Install ansible-core (${{ matrix.ansible-version }})
87
88
run : python3 -m pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check
88
89
90
+ - name : Pre install collections dependencies first so the collection install does not
91
+ run : ansible-galaxy collection install --pre ${{ inputs.collection_pre_install }} -p /home/runner/collections
92
+ if : inputs.collection_pre_install != ''
93
+
89
94
- name : Read collection metadata from galaxy.yml
90
95
id : identify
91
96
uses : ansible-network/github_actions/.github/actions/identify_collection@main
92
97
with :
93
98
source_path : ${{ env.source_directory }}
94
99
95
- - name : Pre install collections dependencies first so the collection install does not
96
- run : ansible-galaxy collection install --pre ${{ inputs.collection_pre_install }} -p /home/runner/collections
97
- if : inputs.collection_pre_install != ''
98
-
99
100
- name : Build and install the collection
100
101
uses : ansible-network/github_actions/.github/actions/build_install_collection@main
101
102
with :
You can’t perform that action at this time.
0 commit comments