mirror of
https://github.com/rocky-linux/infrastructure
synced 2024-11-22 13:11:29 +00:00
Neil Hanlon
662060e18a
if it fails consistently we can bump it or or adjust the image to include our galaxy requirements automatically and make the build process overall a bit more complex, but only when requirements are added. e.g. we only need to rebuild the container when requirements change.
35 lines
841 B
YAML
35 lines
841 B
YAML
---
|
|
# https://github.com/ansible/ansible-lint-action
|
|
name: Ansible Lint
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- '**.yml'
|
|
- '**.yaml'
|
|
|
|
jobs:
|
|
ansible-lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
- name: Git checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Add installed collections in Ansible configuration
|
|
run: |
|
|
echo '[defaults]' > ansible.cfg
|
|
echo 'collections_paths = ./collections' >> ansible.cfg
|
|
|
|
- name: Install role requirements
|
|
run: ansible-galaxy role install -r ansible/roles/requirements.yml
|
|
|
|
- name: Install collection requirements
|
|
run: ansible-galaxy collection install -r ansible/roles/requirements.yml
|
|
|
|
- name: Ansible Lint
|
|
uses: rocky-linux/ansible-lint-action@master
|
|
with:
|
|
args: "--exclude .github"
|