From 10d049bc03ac81ebeadaf82b1e6aefa74af4148f Mon Sep 17 00:00:00 2001 From: Jean-Marie Gervais Date: Thu, 5 Oct 2023 15:56:54 +0200 Subject: [PATCH] fix: update github workflow --- .ansible-lint | 1 + .github/workflows/ansible-lint.yml | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 536c1bc5..b5f5689d 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -5,6 +5,7 @@ exclude_paths: - tdp_lib_dag/ - tdp_vars_defaults/ - tdp_vars_schema/ + - venv warn_list: # or 'skip_list' to silence them completely - experimental # all rules tagged as experimental diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 537f8ff7..5aed73ee 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -2,12 +2,20 @@ name: Ansible Lint on: pull_request: types: [opened, reopened, synchronize] +env: + NAMESPACE: tosit + COLLECTION_NAME: tdp + ANSIBLE_COLLECTIONS_PATH: ${{ github.workspace }} jobs: ansible-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: | - dev/setup.sh - source venv/bin/activate - ansible-lint + with: + path: ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} + - name: Setup venv for linting + run: dev/setup.sh + working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}} + - name: Run ansible-lint + run: source venv/bin/activate && ansible-lint + working-directory: ./ansible_collections/${{env.NAMESPACE}}/${{env.COLLECTION_NAME}}