-
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 1.87 KB
/
galaxy.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
name: Ansible Galaxy
on:
workflow_dispatch:
push:
paths:
- "README.md"
tags:
- "*"
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install test dependencies
run: pip3 install yamllint
- name: Run Yamllint
run: |
yamllint .
- name: Run ansible-lint
uses: ansible/ansible-lint@main
molecule:
name: Molecule
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro:
- amazonlinux2023
- debian10
- debian11
- debian12
- fedora37
- fedora38
- fedora39
- opensuseleap15
- rockylinux8
- rockylinux9
- ubuntu1804
- ubuntu2004
- ubuntu2204
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install test dependencies
run: pip3 install molecule-plugins[docker] jmespath
- name: Secrets to env
uses: oNaiPs/[email protected]
with:
secrets: "${{ toJSON(secrets) }}"
- name: Run Molecule tests
run: molecule test --all
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
MOLECULE_IMAGE: "${{ matrix.distro }}"
Galaxy:
name: Galaxy
runs-on: ubuntu-latest
needs: molecule
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ansible
run: pip3 install ansible-core
- name: Trigger a new import on Galaxy
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)