小编Jos*_*hua的帖子

如何使github动作矩阵元素有条件

我有一个使用 'strategy' = 'matrix' 和要构建的特定配置列表的工作流。

链接到工作流 YAML(也在下面提供)

#
# build-N-test-v2.1-Dev and build-N-test-v2.1-Release are neary
# identical, but a few tests are commented out (to not needlessly stress CI system)
# for v2.1-Dev builds
#
# NOTE: I've tried many tricks - none which seem to work - to get this working on one file with one
# workflow and tests
#     https://github.community/t/what-is-the-correct-if-condition-syntax-for-checking-matrix-os-version/16221
#     https://github.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853
#
# but none seem to work
#

name: build-N-test-v2.1-Dev

on:
  push:
    branches:
      - v2.1-Dev
      #- …
Run Code Online (Sandbox Code Playgroud)

github github-actions building-github-actions

5
推荐指数
4
解决办法
3441
查看次数