ansible-generator/templates/molecule-action.yml.j2

59 lines
1.5 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@v2
with:
path: {% raw %}"${{ github.repository }}"{% endraw %}
- name: molecule
uses: robertdebock/molecule-action@2.7.1
with:
command: lint
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@v2
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@2.7.1
with:
image: {% raw %}${{ matrix.config.image }}{% endraw %}
tag: {% raw %}${{ matrix.config.tag }}{% endraw %}