Enable CI using forgejo actions
Some checks failed
Linter / lint (push) Failing after 20s

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

3
.gitignore vendored
View file

@ -3,3 +3,6 @@
# emacs projectile
.projectile
# ansible-lint directory
.ansible/

View file

@ -1,22 +0,0 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# - repo: https://github.com/pre-commit/pre-commit-hooks
# rev: v3.2.0
# hooks:
# - id: trailing-whitespace
# - id: end-of-file-fixer
# - id: check-yaml
# - id: check-added-large-files
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
# - repo: https://github.com/ansible/ansible-lint
# rev: v24.12.1
# hooks:
# - id: ansible-lint

View file

@ -23,4 +23,7 @@ rules:
# level: warning
truthy:
allowed-values: ['true', 'false', 'yes', 'no']
ignore:
- '*/templates/*'
...

View file

@ -1,6 +0,0 @@
---
- project:
check:
jobs:
- fi-ansible-lint-diff
- fi-yamllint-diff