首页 > 解决方案 > 如何逐步运行 GItHub Actions 作业矩阵?

问题描述

我想在 GitHub Actions 中逐步运行作业矩阵。

不要这样运行:

像这样运行:

  1. 一个
  2. C
  3. D

这是我的操作代码:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        platform: [ x86, x64 ]
        os: [ ubuntu-latest, windows-latest, macos-latest ]
        pkg: [ ZIP, TGZ, DEB, NSIS ]
        exclude:
        - os: windows-latest
          pkg: DEB
        - os: ubuntu-latest
          pkg: NSIS
        - os: macos-latest
          pkg: DEB
        - os: macos-latest
          pkg: NSIS
        - os: ubuntu-latest
          platform: x86
        - os: macos-latest
          platform: x86
        
    runs-on: '${{ matrix.os }}'
    name: '${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.pkg }}: Deploy'
    steps:
    - uses: actions/checkout@v2

如何修改文件以使其以这种方式工作?

标签: githubgithub-actions

解决方案


推荐阅读