From bf965f5e4d7a4ccfcb9b74de16855aca3ef798b0 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Wed, 27 Aug 2025 13:25:19 -0400 Subject: [PATCH] Add CI for linting --- .ci.env | 3 +++ .gitea/workflows/ansible-test.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .ci.env create mode 100644 .gitea/workflows/ansible-test.yml diff --git a/.ci.env b/.ci.env new file mode 100644 index 0000000..6424158 --- /dev/null +++ b/.ci.env @@ -0,0 +1,3 @@ +export ANSIBLE_LINT_EXCLUSION="--exclude .gitea" +export ANSIBLE_INVENTORY="-i 127.0.0.1, --connection=local" +export ANSIBLE_PLAYBOOK="" diff --git a/.gitea/workflows/ansible-test.yml b/.gitea/workflows/ansible-test.yml new file mode 100644 index 0000000..8a65a2a --- /dev/null +++ b/.gitea/workflows/ansible-test.yml @@ -0,0 +1,30 @@ +name: Ansible Code Pipeline +run-name: ${{ gitea.actor }} is running Ansible Code Pipeline +on: + push: + branches: + - main + +jobs: + Ansible-Development-Pipeline: + strategy: + matrix: + os: [ ansible-dev-fedora ] + runs-on: ${{ matrix.os }} + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Ansible Environment Verify + run: | + whoami + . ./.ci.env + env + git log -1 + ansible --version + ansible-lint --version + + - name: Run Ansible-Lint + run: | + . ./.ci.env + ansible-lint -v --offline $ANSIBLE_LINT_EXCLUSION