-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (36 loc) · 1.43 KB
/
ansible-lint-github-hosted.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
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