英文:
How to setup up build matrix with containers on Github Actions
问题
我想针对不可用作GA runners的发行版运行测试。在我的情况下,容器是可以的。
如何描述一个包含容器的构建矩阵?
英文:
I want to run test against distros that are not available as GA runners. In my case, containers are fine.
How I describe a build matrix with containers?
答案1
得分: 9
这里是使用四个不同的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
英文:
Here an example using four different docker images
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论