From 695d7e56ece5f436fe73c25a7509af2d205d1bfa Mon Sep 17 00:00:00 2001 From: Curve Date: Thu, 23 May 2024 21:03:57 +0200 Subject: [PATCH] feat: initial commit --- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++++ Dockerfile | 13 +++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 Dockerfile diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7971f79 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +on: + workflow_dispatch: + +name: 🐳 Build & Publish Docker Image + +jobs: + build-container: + runs-on: ubuntu-latest + + steps: + - name: 📥 Checkout + uses: actions/checkout@v4 + + - name: 🐋 Setup Buildx + uses: docker/setup-buildx-action@v3 + + - name: 🔐 Login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: ♻️ Publish Images + run: | + docker buildx build --tag vienna-builder --load . + docker buildx build --tag vienna-builder-vtk --build-arg VTK="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 push ghcr.io/viennatools/vienna-builder:stock + docker push ghcr.io/viennatools/vienna-builder:vtk diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..45567ba --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM fedora:41 +ARG VTK + +# Build dependencies + +RUN dnf install -y gcc gcc-c++ kernel-devel cmake ninja-build +RUN dnf install -y git docker sed clang-tools-extra + +# Conditionally pre-install VTK + +RUN if [ "$VTK" = "True" ]; then \ + dnf install -y vtk vtk-devel; \ + fi