mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
down_act_outer.sh removed every container named act-*, so starting or
releasing a swarm drill in one worktree killed the act container of a
drill another worktree had running.
workflow.sh now labels act's job containers with
infinito.worktree=${INFINITO_CONTAINER} through the default
ACT_CONTAINER_OPTIONS, and down_act_outer.sh removes only containers
carrying the own label. Both scripts refuse to run without
INFINITO_CONTAINER, so the filter never widens to every act container;
make exports BASH_ENV, which loads it from .env.
Worktrees without a custom.env share the default container name and
therefore still share one label among themselves.
Closes #933
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
16 lines
483 B
Bash
Executable File
16 lines
483 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set +e
|
|
|
|
: "${INFINITO_CONTAINER:?INFINITO_CONTAINER is not set; source scripts/meta/env/load.sh or invoke via make}"
|
|
|
|
ids="$(docker ps -aq --filter "name=^act-" --filter "label=infinito.worktree=${INFINITO_CONTAINER}")"
|
|
if [ -n "${ids}" ]; then
|
|
echo "→ removing act outer container(s) of ${INFINITO_CONTAINER}: ${ids}"
|
|
# shellcheck disable=SC2086
|
|
docker rm -f ${ids} >/dev/null 2>&1
|
|
else
|
|
echo "→ no act outer container present (nothing to do)"
|
|
fi
|
|
|
|
exit 0
|