-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (35 loc) · 971 Bytes
/
main.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
name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x # Use the desired Python version
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Install Ansible Galaxy roles
run: |
ansible-galaxy install -p .ansible_galaxy/roles -r requirements.yml
ansible-galaxy collection install -p .ansible_galaxy/collections -r requirements.yml
- name: Run Ansible Lint
run: ansible-lint playbooks/setup.yml roles
- name: Check Syntax
run: ansible-playbook --syntax-check playbooks/*.yml