Skip to content

Commit

Permalink
refactor(ci): use matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed May 24, 2024
1 parent e9a152e commit 860c519
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ jobs:
build-container:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
include:
- name: stock
- name: vtk
vtk: "True"
- name: python
python: "True"
- name: vtk-python
python: "True"
vtk: "True"

name: "🐳 Build Container (🐍: ${{ matrix.python || 'False' }}, 🧰: ${{ matrix.vtk || 'False' }})"

steps:
- name: 📥 Checkout
uses: actions/checkout@v4
Expand All @@ -23,14 +39,6 @@ jobs:

- name: ♻️ Publish Images
run: |
docker buildx build --tag vienna-builder --load .
docker buildx build --tag vienna-builder-vtk --build-arg VTK="True" --load .
docker buildx build --tag vienna-builder-python --build-arg PYTHON="True" --load .
docker image tag vienna-builder ghcr.io/viennatools/vienna-builder:stock
docker image tag vienna-builder-vtk ghcr.io/viennatools/vienna-builder:vtk
docker image tag vienna-builder-python ghcr.io/viennatools/vienna-builder:python
docker push ghcr.io/viennatools/vienna-builder:stock
docker push ghcr.io/viennatools/vienna-builder:vtk
docker push ghcr.io/viennatools/vienna-builder:python
docker buildx build --tag vienna-builder --build-arg VTK="${{ matrix.vtk || 'False' }}" PYTHON="${{ matrix.python || 'False' }}" --load .
docker image tag vienna-builder ghcr.io/viennatools/vienna-builder:${{ matrix.name }}
docker push ghcr.io/viennatools/vienna-builder:${{ matrix.name }}

0 comments on commit 860c519

Please sign in to comment.