Skip to content

Commit 801b5d8

Browse files
committed
When dispatching, un on all servers for updating tools
Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent 4fb009e commit 801b5d8

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/update-tools.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,26 @@ jobs:
7272
echo "has-changes=false" >> $GITHUB_OUTPUT
7373
exit 1
7474
fi
75+
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
76+
# Manual run without specific server - process all spec files
77+
echo "Manual run without specific server - processing all spec files"
78+
ALL_SPECS=$(find registry -name "spec.yaml" -o -name "spec.yml" | sort)
79+
if [ -z "$ALL_SPECS" ]; then
80+
echo "No spec files found"
81+
echo "has-changes=false" >> $GITHUB_OUTPUT
82+
else
83+
# Convert to JSON array
84+
JSON_ARRAY=$(echo "$ALL_SPECS" | jq -R -s -c 'split("\n") | map(select(length > 0))')
85+
MATRIX=$(echo "$JSON_ARRAY" | jq -c '{spec: .}')
86+
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
87+
echo "has-changes=true" >> $GITHUB_OUTPUT
88+
89+
# Log the files that will be processed
90+
echo "Files to process:"
91+
echo "$JSON_ARRAY" | jq -r '.[]'
92+
fi
7593
else
76-
# PR or manual run without specific server
94+
# PR - use changed files
7795
CHANGED_FILES='${{ steps.changed-files.outputs.all_changed_files }}'
7896
7997
if [ "$CHANGED_FILES" = "[]" ]; then

0 commit comments

Comments
 (0)