Skip to content

Commit cb93355

Browse files
authored
Update dependency-submisison.yml
1 parent d191600 commit cb93355

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/dependency-submisison.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,18 @@ jobs:
7575
echo "Found project files:"
7676
echo "$project_files"
7777
78-
# Try to restore the first project to validate
79-
first_project=$(echo "$project_files" | head -1)
80-
echo "Validating project: $first_project"
78+
# Restore all projects
79+
while IFS= read -r project; do
80+
echo "Restoring project: $project"
81+
if ! dotnet restore "$project"; then
82+
echo "::error::Failed to restore project: $project"
83+
echo "valid-project=false" >> "$GITHUB_OUTPUT"
84+
exit 1
85+
fi
86+
done <<< "$project_files"
8187
82-
if dotnet restore "$first_project"; then
83-
echo "::debug::Project restore successful"
84-
echo "valid-project=true" >> "$GITHUB_OUTPUT"
85-
else
86-
echo "::debug::Project restore failed"
87-
echo "valid-project=false" >> "$GITHUB_OUTPUT"
88-
echo "::error::Validation failed for project: $first_project"
89-
exit 1
90-
fi
88+
echo "::debug::All projects restored successfully"
89+
echo "valid-project=true" >> "$GITHUB_OUTPUT"
9190
9291
- name: submit-dependency-snapshot
9392
uses: advanced-security/component-detection-dependency-submission-action@4f5a06217da80503a4cb123c834d32c263ea1d43

0 commit comments

Comments
 (0)