File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -55,15 +55,26 @@ jobs:
5555 # Determine which directories to run: all for schedule, filtered for other events
5656 if [[ "${{ github.event_name }}" == "schedule" ]]; then
5757 DIRS="$ALL_DIRS"
58- elif [[ '${{ steps.get-pr-info.outputs.pr-info }}' != 'null' ]] && echo '${{ steps.get-pr-info.outputs.pr-info }}' | jq -e '.labels[]? | select(.name == "INCLUDE_ALL_RECIPES")' > /dev/null 2>&1; then
59- echo "Found INCLUDE_ALL_RECIPES label - running all directories"
60- DIRS="$ALL_DIRS"
6158 else
62- CHANGED_FILES='${{ steps.changed-files.outputs.all_changed_files }}'
63- # Filter directories to only those that have changed files
64- DIRS=$(echo "$ALL_DIRS" | jq -c --argjson changed "$CHANGED_FILES" '
65- map(select(. as $dir | $changed | index($dir) != null))
66- ')
59+ # Check if INCLUDE_ALL_RECIPES label is present
60+ PR_INFO='${{ steps.get-pr-info.outputs.pr-info }}'
61+ HAS_INCLUDE_ALL_LABEL=false
62+ if [[ "$PR_INFO" != "null" && "$PR_INFO" != "" ]]; then
63+ if echo "$PR_INFO" | jq -e '.labels[]? | select(.name == "INCLUDE_ALL_RECIPES")' > /dev/null 2>&1; then
64+ HAS_INCLUDE_ALL_LABEL=true
65+ echo "Found INCLUDE_ALL_RECIPES label - running all directories"
66+ fi
67+ fi
68+
69+ if [[ "$HAS_INCLUDE_ALL_LABEL" == "true" ]]; then
70+ DIRS="$ALL_DIRS"
71+ else
72+ CHANGED_FILES='${{ steps.changed-files.outputs.all_changed_files }}'
73+ # Filter directories to only those that have changed files
74+ DIRS=$(echo "$ALL_DIRS" | jq -c --argjson changed "$CHANGED_FILES" '
75+ map(select(. as $dir | $changed | index($dir) != null))
76+ ')
77+ fi
6778 fi
6879
6980 # Assign Docker images to the selected directories
You can’t perform that action at this time.
0 commit comments