From bc82f562dc41e595fa99ba7421c1bdaaa9498950 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Mon, 10 Jul 2023 17:58:47 -0700 Subject: [PATCH] feat: ansible lint github action --- .github/workflows/ansible-lint.yaml | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ansible-lint.yaml diff --git a/.github/workflows/ansible-lint.yaml b/.github/workflows/ansible-lint.yaml new file mode 100644 index 00000000..1129355f --- /dev/null +++ b/.github/workflows/ansible-lint.yaml @@ -0,0 +1,35 @@ +name: ansible-lint +on: + push: + branches: + - ansible-* + pull-request: + branches: + - main + +jobs: + build: + name: Ansible Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # needed for progressive mode to work + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install dependencies + run: | + cd ansible/ + python -m pip install --upgrade pip + pip install pipenv + pipenv install --skip-lock + + - name: Lint + run: | + cd ansible + pipenv run ansible-lint -c ./lint-cfg.yml ./playbooks/