Using inputs inside a GitHub Actions matrix - Stack Overflow

Having the following code snippet:on:workflow_call:inputs:TEST_CLASS:type: stringrequired: truejobs:ex

Having the following code snippet:

on:
  workflow_call:
    inputs:
      TEST_CLASS:
        type: string
        required: true

jobs:
  execute-test:
    name: execute-test
    strategy:
      max-parallel: 1
      matrix:
        test_class: ${{ 
          ( inputs.TEST_CLASS == 'All' && fromJson('["A", "B", "C"') )  ||
          ( inputs.TEST_CLASS != 'All' && fromJson('["' + inputs.TEST_CLASS + '"]') )
        }}

but I am not able to successfully run the second case. Goal is to run a predefined list of classes in the first case, and only the test class entered as input for the second case.

I suppose I am wrong when trying to evaluate the expression but I tried all possible ways without any success. Is there any way I can retrieve the input value inside the fromJson function in such case?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745046917a4608156.html

相关推荐

  • Using inputs inside a GitHub Actions matrix - Stack Overflow

    Having the following code snippet:on:workflow_call:inputs:TEST_CLASS:type: stringrequired: truejobs:ex

    8小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信