41 lines
830 B
YAML
41 lines
830 B
YAML
---
|
|
name: Ansible Lint Check
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: docker
|
|
|
|
container:
|
|
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Create a virtual environment
|
|
run: |
|
|
python -m venv venv
|
|
|
|
- name: Install Ansible and ansible-dev-tools
|
|
run: |
|
|
source venv/bin/activate
|
|
pip install --upgrade pip
|
|
pip install ansible ansible-dev-tools
|
|
shell: bash
|
|
|
|
- name: Run ansible-lint
|
|
run: |
|
|
source venv/bin/activate
|
|
ansible-lint
|
|
shell: bash
|