Skip to content

Commit db58a03

Browse files
authored
Support installing extra collections (#41)
1 parent 003b3ef commit db58a03

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/_shared-docs-build-pr.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ on:
9696
```
9797
9898
</details>
99+
extra-collections:
100+
description: A space separated list of additional collections to install prior to building the documentation.
101+
required: false
102+
type: string
99103

100104
outputs:
101105
artifact-name:
@@ -198,6 +202,13 @@ jobs:
198202
- name: Install Ansible
199203
run: pip install https://github.com/ansible/ansible/archive/${{ inputs.ansible-ref }}.tar.gz --disable-pip-version-check
200204

205+
- name: Install extra collections
206+
shell: bash
207+
run: |
208+
if [[ "${{ inputs.extra-collections }}" != "" ]] ; then
209+
ansible-galaxy collection install ${{ inputs.extra-collections }}
210+
fi
211+
201212
- name: Checkout BASE
202213
uses: actions/checkout@v3
203214
with:

.github/workflows/_shared-docs-build-push.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ on:
4747
required: false
4848
type: string
4949
default: ${{ github.event.repository.name }}_docs_${{ github.sha }}
50+
extra-collections:
51+
description: A space separated list of additional collections to install prior to building the documentation.
52+
required: false
53+
type: string
5054

5155
outputs:
5256
artifact-name:
@@ -109,6 +113,13 @@ jobs:
109113
- name: Install Ansible
110114
run: pip install https://github.com/ansible/ansible/archive/${{ inputs.ansible-ref }}.tar.gz --disable-pip-version-check
111115

116+
- name: Install extra collections
117+
shell: bash
118+
run: |
119+
if [[ "${{ inputs.extra-collections }}" != "" ]] ; then
120+
ansible-galaxy collection install ${{ inputs.extra-collections }}
121+
fi
122+
112123
- name: Checkout
113124
uses: actions/checkout@v3
114125
with:

0 commit comments

Comments
 (0)