12
12
- ' deployments/ansible/galaxy.yml'
13
13
branches :
14
14
- main
15
+ - ansible-vagrant-checksum
15
16
pull_request :
16
17
paths :
17
18
- ' .github/workflows/ansible.yml'
@@ -122,9 +123,31 @@ jobs:
122
123
ANSIBLE_FORCE_COLOR : ' 1'
123
124
MOLECULE_DISTRO : ${{ matrix.distro }}
124
125
126
+ download-vagrant-box :
127
+ runs-on : ubuntu-20.04
128
+ strategy :
129
+ matrix :
130
+ distro :
131
+ - " 2016"
132
+ - " 2019"
133
+ - " 2022"
134
+ steps :
135
+ - uses : actions/checkout@v4
136
+ - name : Download vagrant box
137
+ run : |
138
+ box=$( yq ".platforms[] | select(.name == \"${{ matrix.distro }}\") | .box" ./molecule/config/windows.yml )
139
+ box_version=$( yq ".platforms[] | select(.name == \"${{ matrix.distro }}\") | .box_version" ./molecule/config/windows.yml )
140
+ json=$( wget -nv -O- https://vagrantcloud.com/api/v2/vagrant/${box} )
141
+ url=$( echo "$json" | jq -r ".versions[] | select(.version == \"${box_version}\") | .providers[] | select(.name == \"virtualbox\") | .url" )
142
+ wget -nv -O ${GITHUB_WORKSPACE}/vagrant-${{ matrix.distro }}.box $url
143
+ - uses : actions/upload-artifact@v4
144
+ with :
145
+ name : vagrant-box-${{ matrix.distro }}
146
+ path : vagrant-${{ matrix.distro }}.box
147
+
125
148
windows-test :
126
149
name : Windows Test
127
- needs : lint
150
+ needs : [ lint, download-vagrant-box]
128
151
runs-on : ubuntu-20.04
129
152
timeout-minutes : 60
130
153
strategy :
@@ -149,6 +172,11 @@ jobs:
149
172
- name : Check out the codebase.
150
173
uses : actions/checkout@v4
151
174
175
+ - uses : actions/download-artifact@v4
176
+ with :
177
+ name : vagrant-box-${{ matrix.distro }}
178
+ path : ${{ github.workspace }}
179
+
152
180
- name : Install vagrant and virtualbox
153
181
run : |
154
182
sudo apt update && sudo apt install -y virtualbox
@@ -182,6 +210,7 @@ jobs:
182
210
env :
183
211
PY_COLORS : ' 1'
184
212
ANSIBLE_FORCE_COLOR : ' 1'
213
+ VAGRANT_BOX_URL : ${{ github.workspace }}/vagrant-${{ matrix.distro }}.box
185
214
186
215
push-release-tag :
187
216
name : Push Release Tag
0 commit comments