Skip to content

quick fix DO-1045

quick fix DO-1045 #250

---
name: Lint Ansible role
on: # yamllint disable-line rule:truthy
workflow_dispatch:
push:
paths:
- '**/*.yml'
- '**/*.yaml'
pull_request:
paths:
- '**/*.yml'
- '**/*.yaml'
jobs:
ansible-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for GitHub token to determine reporter type
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "REVIEWDOG_REPORTER=github-pr-review" >> $GITHUB_ENV
else
echo "REVIEWDOG_REPORTER=github-check" >> $GITHUB_ENV
fi
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Run ansible-lint
uses: reviewdog/action-ansiblelint@v1
with:
fail_on_error: true
filter_mode: nofilter
level: info
reporter: ${{ env.REVIEWDOG_REPORTER }}