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:
parent
06d7dd223e
commit
c661866d3c
5 changed files with 39 additions and 28 deletions
33
.forgejo/workflows/ci.yaml
Normal file
33
.forgejo/workflows/ci.yaml
Normal 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
3
.gitignore
vendored
|
|
@ -3,3 +3,6 @@
|
|||
|
||||
# emacs projectile
|
||||
.projectile
|
||||
|
||||
# ansible-lint directory
|
||||
.ansible/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -23,4 +23,7 @@ rules:
|
|||
# level: warning
|
||||
truthy:
|
||||
allowed-values: ['true', 'false', 'yes', 'no']
|
||||
|
||||
ignore:
|
||||
- '*/templates/*'
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- fi-ansible-lint-diff
|
||||
- fi-yamllint-diff
|
||||
Loading…
Add table
Add a link
Reference in a new issue