-
Notifications
You must be signed in to change notification settings - Fork 44
53 lines (43 loc) · 1.79 KB
/
ansible-lint.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
name: Checking the tests files via ansible-lint
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
contains: none
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- name: Get changed files in the docs folder
id: changed-files-specific
uses: tj-actions/changed-files@v35
with:
files: tests/*
- name: Run step if any file(s) in the docs folder change
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "One or more files in the docs folder has changed."
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
- name: Set up Python
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: actions/setup-python@v4
- name: Install ansible-base (devel)
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: pip install ansible --pre --force
- name: Install ansible-lint (devel)
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: pip install ansible-lint --pre --force
- name: Show ansible-base version
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: ansible --version
- name: Show ansible-lint version
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: ansible-lint --version
- name: Checking the changes files via ansible-lint
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do
ansible-lint $file
done