Skip to content

Commit 3f77693

Browse files
committed
Fail PRs with incorrect submodule URL
1 parent 8e73c33 commit 3f77693

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/on_pr.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ concurrency:
1919
cancel-in-progress: true
2020

2121
jobs:
22+
ensure_submodule_sanity:
23+
name: Make sure we're not building with a fork
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout DuckDB Python
27+
uses: actions/checkout@v4
28+
29+
- shell: bash
30+
run: |
31+
submodule_url=$(git config --file .gitmodules --get submodule.external/duckdb.url || true)
32+
expected="github.com/duckdb/duckdb"
33+
if [[ -z "$submodule_url" ]]; then
34+
echo "::error::DuckDB submodule not found in .gitmodules"
35+
exit 1
36+
fi
37+
if [[ "$submodule_url" != *"$expected"* ]]; then
38+
echo "::error::DuckDB submodule must point to $expected, found: $submodule_url"
39+
exit 1
40+
fi
2241
2342
packaging_test:
2443
name: Build a minimal set of packages and run all tests on them

0 commit comments

Comments
 (0)