Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to setup up build matrix with containers on Github Actions

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?

like image 622
Ramon Medeiros Avatar asked Jan 06 '20 12:01

Ramon Medeiros


1 Answers

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
like image 181
Ramon Medeiros Avatar answered Sep 25 '22 14:09

Ramon Medeiros