CatStation/.github/workflows/no-submodule-update.yml
metalgearsloth 16d73b1b55
Workflow standardisation + prune dead runs (#44532)
* Workflow standardisation + prune dead runs

* Also this
2026-07-16 09:35:41 +00:00

37 lines
1.1 KiB
YAML

name: No submodule update checker
on:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
paths:
- 'RobustToolbox'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
this_aint_right:
name: Submodule update in pr found
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- 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