Merge pull request #1 from derFreitag/refactor #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
yaml: | |
name: YAML lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip3 install yamllint | |
- name: Lint the code | |
run: | | |
yamllint */*.yml | |
playbook: | |
name: ansible-playbook lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip3 install ansible | |
- name: Lint | |
run: | | |
ansible-galaxy role install geerlingguy.ntp | |
ansible-playbook --syntax-check ansible.yml | |
ansible-lint: | |
name: ansible-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip3 install ansible-lint | |
- name: Lint | |
run: | | |
ansible-lint . |