From 721dd1e0e91e5dbe48b7ba7e138cf8d43dc7cb03 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Tue, 25 Jan 2022 21:48:15 +0100 Subject: [PATCH] Use a container and action with yamllint. --- templates/gitlab-ci.yml.j2 | 3 ++- templates/molecule-action.yml.j2 | 4 ++-- templates/molecule.yml.j2 | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/gitlab-ci.yml.j2 b/templates/gitlab-ci.yml.j2 index 4f35462..24089f4 100644 --- a/templates/gitlab-ci.yml.j2 +++ b/templates/gitlab-ci.yml.j2 @@ -1,5 +1,5 @@ --- -image: "robertdebock/github-action-molecule:4.0.0" +image: "robertdebock/github-action-molecule:4.0.5" services: - docker:dind @@ -10,6 +10,7 @@ variables: molecule: script: + - test -f requirements.yml && ansible-galaxy install -r requirements.yml - image=${image} tag=${tag} molecule test rules: - if: $CI_COMMIT_REF_NAME == "master" diff --git a/templates/molecule-action.yml.j2 b/templates/molecule-action.yml.j2 index 5997884..570003e 100644 --- a/templates/molecule-action.yml.j2 +++ b/templates/molecule-action.yml.j2 @@ -21,7 +21,7 @@ jobs: path: {% raw %}"${{ github.repository }}"{% endraw %} - name: molecule - uses: robertdebock/molecule-action@3.0.0 + uses: robertdebock/molecule-action@4.0.5 with: command: lint test: @@ -51,7 +51,7 @@ jobs: - name: parse apparmor for mysql run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - name: molecule - uses: robertdebock/molecule-action@3.0.0 + uses: robertdebock/molecule-action@4.0.5 with: image: {% raw %}${{ matrix.config.image }}{% endraw %} diff --git a/templates/molecule.yml.j2 b/templates/molecule.yml.j2 index 7e875e8..ef392da 100644 --- a/templates/molecule.yml.j2 +++ b/templates/molecule.yml.j2 @@ -4,6 +4,7 @@ dependency: name: galaxy options: role-file: requirements.yml + requirements-file: requirements.yml lint: | set -e yamllint .