From d62508b22ad6d08e1321f75f195ba85c21e873a0 Mon Sep 17 00:00:00 2001 From: Eli Gladman <8713153+egladman@users.noreply.github.com> Date: Tue, 5 Dec 2023 21:47:20 -0500 Subject: [PATCH] gracefully stop containers Signed-off-by: Eli Gladman <8713153+egladman@users.noreply.github.com> --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3d91980..bbff77a 100644 --- a/action.yml +++ b/action.yml @@ -50,6 +50,8 @@ runs: env: INPUT_MODULE: ${{ inputs.module }} - - run: docker stop -t 300 $(docker ps --filter name="dagger-engine-*" -q) + - run: | + mapfile -t containers < <(docker ps --filter name="dagger-engine-*" -q) + docker stop -t 300 "${containers[@]}" shell: bash if: ${{ always() }}