From 764db99ef8643f1e35cc3558a0585bc2926568f6 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sun, 8 Oct 2023 09:59:03 +0100 Subject: [PATCH] fix(fractal): start Docker Compose in CI --- templates/fractal/run.twig | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/fractal/run.twig b/templates/fractal/run.twig index a17edeb..2963cb4 100755 --- a/templates/fractal/run.twig +++ b/templates/fractal/run.twig @@ -4,11 +4,12 @@ set -eu +{% set isDocker = flake is not defined %} {% set isFlake = flake is defined %} PATH="$PATH:./node_modules/.bin" -{% if not isFlake %} +{% if isDocker %} # If we're running in CI we need to disable TTY allocation for docker compose # commands that enable it by default, such as exec and run. TTY="${TTY:-}" @@ -19,10 +20,18 @@ fi # Remove and generated or temporary files. function build { +{% if isDocker %} cmd fractal build "${@}" +{% if not isFlake %} + fractal build "${@}" +{% endif %} } function ci:build { +{% if isDocker %} + docker compose up -d +{% endif %} + build }