62 lines
1.7 KiB
Django/Jinja
62 lines
1.7 KiB
Django/Jinja
---
|
|
{{ ansible_managed | comment }}
|
|
|
|
name: Ansible Molecule
|
|
|
|
on:
|
|
push:
|
|
tags_ignore:
|
|
- '*'
|
|
pull_request:
|
|
schedule:
|
|
- cron: '{{ letter_minute_mapping[role_name[0]] }} {{ letter_hour_mapping[role_name[0]] }} {{ letter_day_mapping[role_name[0]] }} * *'
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
- name: ansible-lint
|
|
uses: ansible-community/ansible-lint-action@main
|
|
test:
|
|
needs:
|
|
- lint
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config:
|
|
{% for platform in meta.galaxy_info.platforms %}
|
|
{% for version in platform.versions %}
|
|
{% for tag in distribution_version_mapping[platform.name][version] %}
|
|
- image: "{{ platform_image_mapping[platform.name] }}"
|
|
tag: "{{ tag }}"
|
|
{% endfor %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: {% raw %}"${{ github.repository }}"{% endraw %}
|
|
|
|
- name: disable apparmor for mysql
|
|
run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
|
|
- name: parse apparmor for mysql
|
|
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
|
|
- name: molecule
|
|
uses: robertdebock/molecule-action@5.0.3
|
|
with:
|
|
namespace: {{ docker_namespace }}
|
|
image: {% raw %}${{ matrix.config.image }}{% endraw %}
|
|
|
|
tag: {% raw %}${{ matrix.config.tag }}{% endraw %}
|
|
|
|
{% if github_variables_mapping is defined %}
|
|
env:
|
|
{% for item in github_variables_mapping %}
|
|
{{ item.variable }}: {% raw %}${{ {%endraw %}{{ item.name }} {% raw %}}}{% endraw %}
|
|
{% endfor %}
|
|
{% endif %}
|