5
5
pull_request : {}
6
6
push :
7
7
branches : ["main"]
8
+ workflow_dispatch : {}
8
9
9
10
concurrency :
10
11
group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -18,23 +19,46 @@ permissions:
18
19
contents : read
19
20
20
21
jobs :
22
+ changes :
23
+ runs-on : ubuntu-latest
24
+ outputs :
25
+ role : ${{ steps.filter.outputs.role }}
26
+ steps :
27
+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
28
+ - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
29
+ id : filter
30
+ with :
31
+ base : ${{ github.ref }}
32
+ filters : |
33
+ role:
34
+ - 'tasks/**'
35
+ - 'handlers/**'
36
+ - 'defaults/**'
37
+ - 'vars/**'
38
+ - 'files/**'
39
+ - 'library/**'
40
+ - 'module_utils/**'
41
+ - 'Vagrantfile'
21
42
vagrant-deploy :
43
+ needs : ["changes"]
44
+ if : ${{ needs.changes.outputs.role == 'true' || github.event_name == 'workflow_dispatch' }}
22
45
runs-on : ubuntu-22.04
23
46
steps :
24
47
- uses : actions/checkout@v4
25
48
- run : sudo apt install nfs-kernel-server
26
49
- run : sudo pipx inject ansible-core jmespath netaddr
27
50
- run : ansible-galaxy install geerlingguy.ntp
51
+ # yamllint disable rule:line-length
28
52
- name : setup vagrant
29
53
run : |
30
54
# Copyright The containerd Authors
31
- #
55
+ #
32
56
# Licensed under the Apache License, Version 2.0 (the "License");
33
57
# you may not use this file except in compliance with the License.
34
58
# You may obtain a copy of the License at
35
- #
59
+ #
36
60
# http://www.apache.org/licenses/LICENSE-2.0
37
- #
61
+ #
38
62
# Unless required by applicable law or agreed to in writing, software
39
63
# distributed under the License is distributed on an "AS IS" BASIS,
40
64
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50
74
sudo apt-get build-dep -y vagrant ruby-libvirt
51
75
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
52
76
vagrant plugin install vagrant-libvirt
77
+ # yamllint enable rule:line-length
53
78
- run : >
54
79
sudo -E -u ${USER}
55
80
ANSIBLE_STDOUT_CALLBACK=debug
0 commit comments