Improved workflows and actions
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: Ansible Validate On Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "ansible/**"
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
ansible-validate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Install Python and required packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3-pip
|
||||
python3 -m pip install -r requirements.txt
|
||||
|
||||
- name: Ansible Lint
|
||||
run: |
|
||||
cd ansible
|
||||
ansible-lint .
|
||||
|
||||
- name: Ansible Playbook Syntax Check
|
||||
run: |
|
||||
cd ansible
|
||||
ansible-playbook --syntax-check playbook_*.yml
|
||||
Reference in New Issue
Block a user