Skip to content

Ubuntu security updates component #19

Ubuntu security updates component

Ubuntu security updates component #19

Workflow file for this run

---
name: Molecule
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
provide_scenarios:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Get changed files
id: changed-files-yaml
uses: tj-actions/changed-files@v39
with:
json: true
quotepath: false
files_yaml: |
playbooks:
- 'playbooks/*.yml'
roles:
- 'playbooks/roles/**/**'
- id: set-playbooks-matrix
run: echo "playbooks=matrix::${{ steps.changed-files-yaml.outputs.playbooks_all_changed_files }}" >> $GITHUB_OUTPUT
- name: Debug
run: echo ${{ steps.changed-files-yaml.outputs.playbooks_all_changed_files }}
- name: Debug
run: echo ${{ steps.set-playbooks-matrix.outputs.playbooks }}
outputs:
playbooks_matrix: ${{ steps.set-playbooks-matrix.outputs.playbooks }}
molecule_playbooks:
needs: provide_scenarios
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
playbooks: ${{ fromJSON(needs.provide_scenarios.outputs.playbooks_matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
- name: Filename to scenario name
id: set-scenario
run: echo "scenario_name=`basename -s .yml ${{ matrix.playbooks }}`" >> $GITHUB_OUTPUT
- name: Molecule tests for playbooks
uses: gofrolist/molecule-action@v2
with:
molecule_command: test
molecule_args: --scenario-name playbook-${{ steps.set-scenario.outputs.scenario_name }}
env:
ANSIBLE_FORCE_COLOR: '1'