From 0b48ec9a3b24573b81520574d1987dbaa142717a Mon Sep 17 00:00:00 2001 From: Nikita Elfimov Date: Thu, 19 Sep 2024 14:38:37 +0300 Subject: [PATCH] feat(checks): reusable infrastructure checks --- .../reusable-infrastructure-checks.yaml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/reusable-infrastructure-checks.yaml diff --git a/.github/workflows/reusable-infrastructure-checks.yaml b/.github/workflows/reusable-infrastructure-checks.yaml new file mode 100644 index 0000000..604bbe4 --- /dev/null +++ b/.github/workflows/reusable-infrastructure-checks.yaml @@ -0,0 +1,25 @@ +name: Reusable infrastructure checks + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint Ansible + uses: ansible/ansible-lint@main + + - name: Sanity Ansible + uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main + + - name: Find and Validate NGINX Configs + run: | + find $GITHUB_WORKSPACE -name 'nginx.conf' | while read -r conf; do + echo "Validating $conf" + sudo nginx -t -c "$conf" || exit 1 + done