如何在 Github 操作上使用容器设置构建矩阵

How to setup up build matrix with containers on Github Actions

我想运行 测试未正式发布的发行版runners。就我而言,容器很好。

如何描述带有容器的构建矩阵?

这里是一个使用四个不同 docker 图片的例子

name: ci

jobs:
  job:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        container: ["ubuntu:bionic", "fedora:31", "opensuse/leap:42.3", "centos8"]

    container:
      image: ${{ matrix.container }}

    steps:
      - name: checkout
        uses: actions/checkout@v1