-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 959 Bytes
/
yamllint.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
---
name: Lint
on:
workflow_call:
inputs:
rolename:
required: true
type: string
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v4
- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install test dependencies.
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt
- name: Lint code (yamllint).
run: |
yamllint .
if: ${{ inputs.rolename == '' }}
- name: Lint Role (yamllint).
run: |
ansible-lint roles/${{ inputs.rolename }}
if: ${{ inputs.rolename != '' }}
- name: Lint Role (ansible-lint).
run: |
ansible-lint roles/${{ inputs.rolename }}