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