Skip to content

Commit 714886f

Browse files
author
Vincent Li
committed
update
1 parent 3b4ed8d commit 714886f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci_child.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
import os
8686
import shlex
8787
import sys
88+
import uuid
8889
from pathlib import Path
8990
9091
from run import (
@@ -187,8 +188,15 @@ jobs:
187188
env_opt("IMAGE_TAG") or job.get("image", "latest"),
188189
)
189190
191+
docker_args_text = shlex.join(docker_args)
192+
delimiter = f"EOF_{uuid.uuid4().hex}"
193+
190194
with open(github_env, "a", encoding="utf-8") as f:
191-
f.write(f"DOCKER_ARGS={shlex.join(docker_args)}\n")
195+
# DOCKER_ARGS contains an embedded multiline bash script argument;
196+
# write it using the multiline GITHUB_ENV syntax.
197+
f.write(f"DOCKER_ARGS<<{delimiter}\n")
198+
f.write(docker_args_text + "\n")
199+
f.write(f"{delimiter}\n")
192200
f.write(f"RESULT_DIR={results_dir}\n")
193201
f.write(f"IMAGE_TAG={image_ref}\n")
194202
PY

0 commit comments

Comments
 (0)