-
Notifications
You must be signed in to change notification settings - Fork 59
53 lines (39 loc) · 1.85 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
---
# Workflow for ansible-lint of the collection
name: ansible-lint of the collection
on:
schedule:
- cron: '31 13 * * 1'
workflow_dispatch:
jobs:
ansible-lint:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@main
- name: Set up Python 3
uses: actions/setup-python@main
with:
python-version: '3.9'
- name: Install test dependencies
run: |
pip3 install ansible==7.5.0
pip3 install ansible-compat==3.0.2
pip3 install ansible-core==2.14.5
pip3 install ansible-lint==6.8.6
# - name: Install collection dependencies
# run: ansible-galaxy collection install community.general
- name: Move the collection to the correct location - Create new directory
run: mkdir -p /home/runner/.ansible/collections/ansible_collections/community
- name: Move the collection to the correct location - Move the collection
working-directory: /home/runner/
run: mv /home/runner/work/community.sap_install/community.sap_install /home/runner/.ansible/collections/ansible_collections/community
- name: Move the collection to the correct location - Rename the directory
working-directory: /home/runner/
run: mv /home/runner/.ansible/collections/ansible_collections/community/community.sap_install /home/runner/.ansible/collections/ansible_collections/community/sap_install
- name: Run ansible-lint
working-directory: /home/runner/.ansible/collections/ansible_collections/community/sap_install
run: ansible-lint
- name: Move the collection to its previous location
working-directory: /home/runner/
run: mv /home/runner/.ansible/collections/ansible_collections/community/sap_install /home/runner/work/community.sap_install/community.sap_install