File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
4545 INPUT="${{ inputs.containers }}"
4646 if [[ "$INPUT" == "all" ]]; then
47- while IFS= read -r CONTAINER ; do
48- CHANGED+=("$CONTAINER")
49- done < <(ls -d containers/*/ | xargs -I{} basename {})
47+ for CI_JSON in containers/*/ci.json ; do
48+ CHANGED+=("$(basename "$(dirname "$CI_JSON")")")
49+ done
5050 else
5151 while IFS= read -r CONTAINER; do
5252 CHANGED+=("$CONTAINER")
@@ -100,7 +100,7 @@ jobs:
100100 # A container is downstream if it appears in the downstream list of another container being built.
101101 DOWNSTREAM_IN_BUILD=()
102102 for CONTAINER in "${CHANGED[@]}"; do
103- DS_LIST=$(jq -r '.downstream // [] | .[]' "containers/$CONTAINER/ci.json" 2>/dev/null)
103+ DS_LIST=$(jq -r '.downstream // [] | .[]' "containers/$CONTAINER/ci.json" 2>/dev/null || true )
104104 for DS in $DS_LIST; do
105105 if [[ " ${CHANGED[*]} " =~ " $DS " ]] && [[ ! " ${DOWNSTREAM_IN_BUILD[*]} " =~ " $DS " ]]; then
106106 DOWNSTREAM_IN_BUILD+=("$DS")
You can’t perform that action at this time.
0 commit comments