-
Notifications
You must be signed in to change notification settings - Fork 29
53 lines (39 loc) · 1.49 KB
/
verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Verify
on:
pull_request: {}
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
jobs:
verify:
name: Verify
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Vagrantfile lint tool
run: sudo gem install rubocop
- name: Install Ansible
run: pip3 install --user ansible==8.3.0
- name: Check ansible version
run: ansible --version
- name: Vagrantfile syntax check
run: rubocop ./Vagrantfile --except LineLength,BlockLength,Eval,MutableConstant,FormatStringToken,EmptyLinesAroundArguments,IfUnlessModifier
- name: Install Ansible roles
run: ansible-galaxy install --role-file=provisioning/requirements.yml "--roles-path=$HOME/roles"
- name: Ansible syntax check
run: ansible-playbook provisioning/playbook.yml --inventory=tests/inventory --syntax-check
env:
ANSIBLE_ROLES_PATH: '$HOME/roles'
- name: Login to Docker Hub
if: "!github.event.pull_request || (github.event.pull_request.head.repo.full_name == github.repository && !startsWith(github.head_ref, 'dependabot/'))"
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docs
run: (cd docs && sudo chmod go+rw -R . && ./build.sh)