ansible-collection-apps/.forgejo/workflows/ansible-lint.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

2025-11-08 20:55:40 +00:00
---
name: Ansible Lint Check
on:
push:
branches: [main, develop]
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: Install core collection
run: |
source venv/bin/activate
ansible-galaxy collection install git+https://guardianproject.dev/sr2/ansible-collection-core.git
shell: bash
2025-11-08 20:55:40 +00:00
- name: Run ansible-lint
run: |
source venv/bin/activate
mkdir -p ansible_collections/sr2c
ln -s . ansible_collections/sr2c/apps
2025-11-08 20:55:40 +00:00
ansible-lint
shell: bash