Skip to content

ansible-lint of the collection #382

ansible-lint of the collection

ansible-lint of the collection #382

Workflow file for this run

---
# 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@v4
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install test dependencies
run: |
pip3 install ansible==9.1.0
pip3 install ansible-compat==4.1.10
pip3 install ansible-core==2.16.2
pip3 install ansible-lint==6.22.1
# - 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