35 lines
830 B
YAML
35 lines
830 B
YAML
---
|
|
|
|
name: Ansible Lint
|
|
on: [push, pull_request] # noqa yaml[truthy]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apt update; apt install --yes python3-pip patch
|
|
pip3 install --break-system-packages ansible-lint aar-doc
|
|
|
|
- name: Patch aar-doc
|
|
run: |
|
|
cd /usr/local/lib/python3.*/dist-packages/
|
|
patch -p0 < $OLDPWD/.forgejo/workflows/aardoc.patch
|
|
|
|
|
|
- name: Generate metadata, readme and defaults from argument_spec
|
|
run: |
|
|
set -euo pipefail
|
|
for r in roles/*; do
|
|
aar-doc --output-mode replace $r markdown
|
|
aar-doc --output-mode replace $r defaults
|
|
done
|
|
|
|
- name: Run ansible-lint
|
|
run: |
|
|
ansible-lint
|