1
0
Fork 0
forked from infra/ansible

Enable CI using forgejo actions

Clean the old CI setups and define forgejo actions on ansible
repository.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
Michal Konečný 2026-02-19 14:47:58 +01:00
commit c661866d3c
5 changed files with 39 additions and 28 deletions

View file

@ -0,0 +1,33 @@
name: Linter
on: [push, pull-request]
jobs:
lint:
runs-on: infra-1
steps:
- name: Install testing tools
run: |
sudo dnf install -y yamllint ansible-lint
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
- name: Run yamllint
if: steps.changed-files.outputs.any_changed == 'true'
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
yamllint "$file"
done
- name: Run ansible-lint
if: steps.changed-files.outputs.any_changed == 'true'
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
ansible-lint "$file"
done