Skip to content

Commit

Permalink
#32: push new docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
tlamonthezie committed Jul 26, 2024
1 parent cd2d1fb commit bcd35ef
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/pushbasedockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,44 @@ name: Build & push base Docker image

on:
# Push event: Useful for testing new image build on CI
# push:
# branches:
# - 32-vt-tv-improve-ci
push:
branches:
- 32-vt-tv-improve-ci

# Dispatch event (manually triggered)
workflow_dispatch:
inputs:
image:
type: choice
description: The configuration to build as a combination of os, compiler, vtk and python versions
options:
- ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8
- ubuntu_22.04-clang_11-vtk_9.2.2-py_3.8
# - ubuntu_24.04-gcc_14-vtk_9.3.0-py_3.12 # FAILS
default: ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8
# # Dispatch event (manually triggered)
# workflow_dispatch:
# inputs:
# image:
# type: choice
# description: The configuration to build as a combination of os, compiler, vtk and python versions
# options:
# - ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8
# - ubuntu_22.04-clang_11-vtk_9.2.2-py_3.8
# - ubuntu_22.04-gcc_12-vtk_9.3.0-py_3.8
# # - ubuntu_24.04-gcc_14-vtk_9.3.0-py_3.12 # FAILS
# default: ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8

jobs:
push_to_registry:
name: Build & Push
runs-on: ubuntu-latest
# Please comment the matrix when using the dispatch event and use inputs instead.
# Matrix for build tests on push event.
# strategy:
# matrix:
# image:
# - ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8
# - ubuntu_22.04-clang_14-vtk_9.2.2-py_3.8
# # - ubuntu_24.04-gcc_11-vtk_9.3.1-py_3.12 # FAILS
strategy:
matrix:
image:
# - ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8
# - ubuntu_22.04-clang_14-vtk_9.2.2-py_3.8
- ubuntu_22.04-gcc_12-vtk_9.3.0-py_3.8
# - ubuntu_24.04-gcc_11-vtk_9.3.1-py_3.12 # FAILS
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Extract build configuration
# If workflow dispatch event replace `matrix.image` by `inputs.image`
run: |
IFS='_-' read -r -a CONFIG <<< "${{ inputs.image }}"
IFS='_-' read -r -a CONFIG <<< "${{ matrix.image }}"
echo "BASE_IMAGE=${CONFIG[0]}:${CONFIG[1]}" >> $GITHUB_ENV
echo "CC=${CONFIG[2]}-${CONFIG[3]}" >> $GITHUB_ENV
if [[ "${CONFIG[2]}" == "gcc" ]]; then
Expand All @@ -49,7 +51,7 @@ jobs:
fi
echo "VTK_VERSION=${CONFIG[5]}" >> $GITHUB_ENV
echo "PYTHON_VERSION=${CONFIG[7]}" >> $GITHUB_ENV
echo "DOCKER_TAG=${{ inputs.image }}" >> $GITHUB_ENV
echo "DOCKER_TAG=${{ matrix.image }}" >> $GITHUB_ENV
- name: Build configuration
run: |
Expand Down

0 comments on commit bcd35ef

Please sign in to comment.