-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (64 loc) · 2.05 KB
/
galaxy-notify.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
---
name: Molecule release
on:
push:
branches:
- "master"
# Sequence of patterns matched against refs/tags
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
molecule:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Better to use one scenario per OS for faster performance and easier debugging
scenario:
- ubuntu-2004
steps:
- name: Checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies.
run: |
python3 -m pip install --upgrade pip
python3 -m pip install yamllint ansible-lint ansible "molecule[lint,docker]"
- name: Install Galaxy dependencies.
run: ansible-galaxy collection install community.docker
- name: check molecule version
run: molecule --version
- name: Run molecule converge
run: "molecule converge --scenario-name ${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
working-directory: "${{ github.repository }}"
- name: Run molecule syntax
run: "molecule syntax --scenario-name ${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
working-directory: "${{ github.repository }}"
- name: Run molecule idempotence
run: "molecule idempotence --scenario-name ${{ matrix.scenario }}"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
working-directory: "${{ github.repository }}"
# https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
# Don't forget to add the secret galaxy_api_key in your repository
release:
runs-on: ubuntu-latest
needs:
- molecule
steps:
- name: galaxy
uses: robertdebock/[email protected]
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}