diff --git a/.github/workflows/no-submodule-update.yml b/.github/workflows/no-submodule-update.yml index f2a9d72e37..9d1f2d3b11 100644 --- a/.github/workflows/no-submodule-update.yml +++ b/.github/workflows/no-submodule-update.yml @@ -10,5 +10,22 @@ jobs: name: Submodule update in pr found runs-on: ubuntu-latest steps: - - name: Fail - run: exit 1 + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Check changed files + shell: pwsh + run: | + $changedFiles = @(git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}") + + if ($changedFiles.Count -eq 1 -and $changedFiles[0] -eq "RobustToolbox") { + Write-Host "Only RobustToolbox was changed; allowing standalone submodule update." + exit 0 + } + + Write-Host "RobustToolbox was updated alongside other files:" + foreach ($file in $changedFiles) { + Write-Host " - $file" + } + exit 1