diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d414628..eafb52f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -20,6 +20,35 @@ updates: schedule: interval: "daily" - package-ecosystem: “nuget” - directories: “/csharp/*” + directories: + - “/csharp/*” + - /csharp/snippets/configuration/InitDefaultConfig/ + - /csharp/snippets/configuration/RegisterDataSources/ + - /csharp/snippets/information/GetVersion/ + - /csharp/snippets/information/CheckRepositoryPerformance/ + - /csharp/snippets/information/GetRepositoryInfo/ + - /csharp/snippets/information/GetLicense/ + - /csharp/snippets/loading/LoadWithStatsViaLoop/ + - /csharp/snippets/loading/LoadViaLoop/ + - /csharp/snippets/loading/LoadWithInfoViaFutures/ + - /csharp/snippets/loading/LoadViaFutures/ + - /csharp/snippets/loading/LoadRecords/ + - /csharp/snippets/loading/LoadViaQueue/ + - /csharp/snippets/loading/LoadTruthSetWithInfoViaLoop/ + - /csharp/snippets/redo/LoadWithRedoViaLoop/ + - /csharp/snippets/redo/RedoContinuousViaFutures/ + - /csharp/snippets/redo/RedoWithInfoContinuous/ + - /csharp/snippets/redo/RedoContinuous/ + - /csharp/snippets/searching/SearchViaFutures/ + - /csharp/snippets/searching/SearchRecords/ + - /csharp/snippets/initialization/EnginePriming/ + - /csharp/snippets/initialization/PurgeRepository/ + - /csharp/snippets/initialization/EnvironmentAndHubs/ + - /csharp/snippets/stewardship/ForceUnresolve/ + - /csharp/snippets/stewardship/ForceResolve/ + - /csharp/snippets/deleting/DeleteViaLoop/ + - /csharp/snippets/deleting/DeleteViaFutures/ + - /csharp/snippets/deleting/DeleteWithInfoViaFutures/ + - /csharp/runner/SnippetRunner/ schedule: interval: “daily" diff --git a/.github/workflows/validate-csharp-dependabot-config.yaml b/.github/workflows/validate-csharp-dependabot-config.yaml new file mode 100644 index 0000000..acf49fc --- /dev/null +++ b/.github/workflows/validate-csharp-dependabot-config.yaml @@ -0,0 +1,29 @@ +name: validate csharp dependabot config + +on: + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + validate-csharp-dependabot-config: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v5 + + - run: | + cs_projects=$(find . -name "*.csproj" | cut -c 2-) + exit_code=0 + for project in $cs_projects; do + project_directory=${project%/*} + echo "[INFO] project directory is: $project_directory" + if ! grep -qE "\- $project_directory/" .github/dependabot.yml; then + echo "[ERROR] $project_directory missing from .github/dependabot.yml configuration" + exit_code=1 + fi + done + + exit $exit_code