Skip to content

How to use matrix and boolean? #25555

Answered by chrispat
BotellaA asked this question in Actions
Discussion options

You must be logged in to vote

This works for me.

name: Boolean Matrix

on:
push:
branches:
- boolean-matrix

jobs:
build:

runs-on: ubuntu-latest
strategy:
  matrix:
    config:
    - {run-it: true}
    - {run-it: false}

steps:
- name: Run a one-line script
  run: echo Hello, world!
  if: matrix.config.run-it

https://github.com/chrispat/test-action/runs/319324546

However, given you are doing string comparison below I would also expect that to work. 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants