Use a container and action with yamllint.

This commit is contained in:
Robert de Bock 2022-01-25 21:48:15 +01:00
parent 8070ced90d
commit 721dd1e0e9
3 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,5 @@
--- ---
image: "robertdebock/github-action-molecule:4.0.0" image: "robertdebock/github-action-molecule:4.0.5"
services: services:
- docker:dind - docker:dind
@ -10,6 +10,7 @@ variables:
molecule: molecule:
script: script:
- test -f requirements.yml && ansible-galaxy install -r requirements.yml
- image=${image} tag=${tag} molecule test - image=${image} tag=${tag} molecule test
rules: rules:
- if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME == "master"

View File

@ -21,7 +21,7 @@ jobs:
path: {% raw %}"${{ github.repository }}"{% endraw %} path: {% raw %}"${{ github.repository }}"{% endraw %}
- name: molecule - name: molecule
uses: robertdebock/molecule-action@3.0.0 uses: robertdebock/molecule-action@4.0.5
with: with:
command: lint command: lint
test: test:
@ -51,7 +51,7 @@ jobs:
- name: parse apparmor for mysql - name: parse apparmor for mysql
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: molecule - name: molecule
uses: robertdebock/molecule-action@3.0.0 uses: robertdebock/molecule-action@4.0.5
with: with:
image: {% raw %}${{ matrix.config.image }}{% endraw %} image: {% raw %}${{ matrix.config.image }}{% endraw %}

View File

@ -4,6 +4,7 @@ dependency:
name: galaxy name: galaxy
options: options:
role-file: requirements.yml role-file: requirements.yml
requirements-file: requirements.yml
lint: | lint: |
set -e set -e
yamllint . yamllint .