Skip to content

Commit 1cc1265

Browse files
committed
ci: verify foundry.lock matches submodule commits
Assisted-by: Claude:claude-sonnet-4-6
1 parent 763bfc0 commit 1cc1265

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/foundry-lock.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: foundry.lock
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v7
15+
16+
- name: Check foundry.lock
17+
run: |
18+
status=0
19+
while read -r path rev; do
20+
actual=$(git ls-tree HEAD "$path" | awk '{print $3}')
21+
if [ "$actual" != "$rev" ]; then
22+
echo "::error::$path: foundry.lock rev $rev does not match submodule commit $actual"
23+
status=1
24+
fi
25+
done < <(jq -r 'to_entries[] | "\(.key) \(.value | to_entries[0].value.rev)"' foundry.lock)
26+
exit $status

0 commit comments

Comments
 (0)