-
Notifications
You must be signed in to change notification settings - Fork 29
64 lines (49 loc) · 1.83 KB
/
build.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
53
54
55
56
57
58
59
60
61
62
63
64
name: Build
on:
push:
branches:
- master
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
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)
- name: Configure Git user
run: >-
git config --global user.name 'John Freeman' &&
git config --global user.email '[email protected]'
- name: Publish docs
run: (cd docs && ./build.sh --publish)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}