Fix an issue with job-level if evaluating before strategy

This commit is contained in:
Alexander Gorelyshev
2025-12-08 11:12:01 +04:00
parent 5616ff6302
commit db64b9f114

View File

@@ -54,16 +54,16 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.detect.outputs.matrix) }}
# Skip the job when only the sentinel is present
if: ${{ matrix.role != '__no_role__' }}
steps:
- name: Checkout the repo
if: ${{ matrix.role != '__no_role__' }}
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@4d84239119b14cba1690b971f05c0bab912bea04
- name: "Set up micromamba"
uses: mamba-org/setup-micromamba@4d84239119b14cba1690b971f05c0bab912bea04
if: ${{ matrix.role != '__no_role__' }}
with:
micromamba-version: '2.4.0-0'
environment-file: ci/conda.yml
@@ -72,10 +72,12 @@ jobs:
cache-environment: true
- name: "Install collection dependencies"
if: ${{ matrix.role != '__no_role__' }}
run: ansible-galaxy install -r requirements.yml
shell: micromamba-shell {0}
- name: "Run Molecule tests"
if: ${{ matrix.role != '__no_role__' }}
working-directory: ${{ matrix.role }}
run: molecule test
shell: micromamba-shell {0}