Initial setup of gitea actions
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: Ansible Validate On Pull Request
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "ansible/**"
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
jobs:
|
||||
ansible-validate:
|
||||
runs-on: cicd-base
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup environment
|
||||
uses: ./.gitea/actions/setup-env
|
||||
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python3 -m pip install -r requirements/ansible.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