Skip to content

ci(docker): Try to get py matrix build #296

ci(docker): Try to get py matrix build

ci(docker): Try to get py matrix build #296

Workflow file for this run

name: Docker
on:
push:
branches:
- master
jobs:
docker:
name: Docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.9, 3.10]
# Start a local registry to which we will push trame-common, so that
# docker buildx may access it in later steps.
services:
registry:
image: registry
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# To emulate other architectures
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# For multi-platform builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- name: Create month stamp
run: echo "MONTH_STAMP=$(date +%Y-%m)" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build common
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: docker
file: docker/Dockerfile.common
push: true
tags: localhost:5000/trame-common
- name: Build common (glvnd)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.common
build-args: BASE_IMAGE=nvidia/opengl:1.2-glvnd-devel-ubuntu20.04
push: true
tags: localhost:5000/trame-common-glvnd
- name: Build common (cuda)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.common
build-args: BASE_IMAGE=nvidia/cuda:12.2.0-runtime-ubuntu20.04
push: true
tags: localhost:5000/trame-common-cuda
- name: Build and push (py${{ matrix.python-version }}-pip)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: docker
file: docker/Dockerfile.pip
build-args:
- BASE_IMAGE=localhost:5000/trame-common

Check failure on line 84 in .github/workflows/docker.yml

View workflow run for this annotation

GitHub Actions / Docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker.yml (Line: 84, Col: 15): A sequence was not expected .github/workflows/docker.yml (Line: 98, Col: 15): A sequence was not expected
- PYTHON_VERSION=${{ matrix.python-version }}
push: true
tags: |
kitware/trame:py${{ matrix.python-version }}
kitware/trame:py${{ matrix.python-version }}-ubuntu-20.04
kitware/trame:py${{ matrix.python-version }}-${{ env.MONTH_STAMP }}
- name: Build and push (pip py${{ matrix.python-version }}-glvnd)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.pip
build-args:
- BASE_IMAGE=localhost:5000/trame-common-glvnd
- PYTHON_VERSION=${{ matrix.python-version }}
push: true
tags: |
kitware/trame:py${{ matrix.python-version }}-glvnd
kitware/trame:py${{ matrix.python-version }}-1.2-glvnd-runtime-ubuntu20.04
kitware/trame:py${{ matrix.python-version }}-glvnd-${{ env.MONTH_STAMP }}
- name: Build and push (pip py${{ matrix.python-version }}-cuda)
uses: docker/build-push-action@v2
with:
context: docker
file: docker/Dockerfile.pip
build-args:
- BASE_IMAGE=localhost:5000/trame-common-cuda
- PYTHON_VERSION=${{ matrix.python-version }}
push: true
tags: |
kitware/trame:py${{ matrix.python-version }}-cuda
kitware/trame:py${{ matrix.python-version }}-12.2.0-cuda-runtime-ubuntu20.04
kitware/trame:py${{ matrix.python-version }}-cuda-${{ env.MONTH_STAMP }}
- name: Build and push (py${{ matrix.python-version }}-conda)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: docker
file: docker/Dockerfile.conda
build-args:
- BASE_IMAGE=localhost:5000/trame-common
- PYTHON_VERSION=${{ matrix.python-version }}
push: true
tags: |
kitware/trame:py${{ matrix.python-version }}-conda
kitware/trame:py${{ matrix.python-version }}-conda_ubuntu-20.04
kitware/trame:py${{ matrix.python-version }}-conda-${{ env.MONTH_STAMP }}