diff --git a/.github/workflows/ansible-lint-sap_reusable_workflow.yml b/.github/workflows/ansible-lint-sap_reusable_workflow.yml new file mode 100644 index 000000000..63e590f96 --- /dev/null +++ b/.github/workflows/ansible-lint-sap_reusable_workflow.yml @@ -0,0 +1,36 @@ +--- + +# Workflow for ansible-lint of a role + +name: ansible-lint reusable workflow for role + +on: + workflow_call: + inputs: + role: + required: true + type: string + +jobs: + ansible-lint: + runs-on: ubuntu-latest + + steps: + - name: Check out the code + uses: actions/checkout@v4 + + - name: Set up Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install test dependencies + run: | + pip3 install ansible==9.1.0 + pip3 install ansible-compat==4.1.11 + pip3 install ansible-core==2.16.2 + pip3 install ansible-lint==6.22.2 + + - name: Run ansible-lint + working-directory: /home/runner/work/community.sap_install/community.sap_install/roles/${{ inputs.role }} + run: ansible-lint