Skip to content

lint workflow #2038

lint workflow

lint workflow #2038

Workflow file for this run

name: Ansible Lint # feel free to pick your own name
on:
pull_request:
branches:
- main
- release-1.4
- release-1.4.0.1
- release-1.4.1
- release-1.4.2
- devel-1.4.2
- devel-1.4.2.1
- devel-1.4.2.2
- devel-1.5
- release-1.5.1
- release-1.6
- release-1.7
- staging
- release-1.7.1
- pub/new_architecture
jobs:
build:
name: Ansible Lint # Naming the build is important to use it as a status check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Modify ansible.cfg for linting
run: |
sed -i '/collections_path/d' ansible.cfg
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Ansible and Ansible Lint
run: |
python -m pip install --upgrade pip
pip install ansible
# remove @virtual_env
- name: Install Ansible Collections from requirements.yml
run: |
ansible-galaxy collection install -r .config/requirements.yml
- name: Run ansible-lint
uses: ansible/ansible-lint@v25.1.3
with:
args: --config=.config/ansible-lint.yml
# env:
# ANSIBLE_COLLECTIONS_PATH: "/home/runner/work/omnia/omnia/.ansible/collections:/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages"