Skip to content

ansible-lint validation on PR-57 #65

ansible-lint validation on PR-57

ansible-lint validation on PR-57 #65

---
name: Ansible Lint on GitHub-Hosted Runner
run-name: ansible-lint validation on PR-${{ github.event.pull_request.number }}
on:
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
ansible-lint:
name: Ansible Lint
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Populate ansible config
run: |
cat <<EOF > ansible.cfg
[defaults]
collections_path = ./collections:./imported/collections
roles_path = ./roles:./imported:./imported/roles
[galaxy]
server_list = automation_hub_published, automation_hub_validated, galaxy
[galaxy_server.automation_hub_published]
url=https://console.redhat.com/api/automation-hub/content/published/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=${{ secrets.RH_AUTOMATION_HUB_TOKEN }}
[galaxy_server.automation_hub_validated]
url=https://console.redhat.com/api/automation-hub/content/validated/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=${{ secrets.RH_AUTOMATION_HUB_TOKEN }}
[galaxy_server.galaxy]
url=https://galaxy.ansible.com/
EOF
- name: Run ansible-lint
uses: ansible/ansible-lint@main