File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed
Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " github-actions"
4+ directory : " /"
5+ schedule :
6+ interval : " monthly"
7+ - package-ecosystem : " maven"
8+ directory : " /"
9+ schedule :
10+ interval : " weekly"
Original file line number Diff line number Diff line change 1+ name : Verify
2+ on : [pull_request]
3+ env :
4+ TERM : xterm-256color
5+ jobs :
6+ verify-commits :
7+ name : Check Commit Signatures
8+ runs-on : [self-hosted, build]
9+
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v4
13+
14+ - name : Check signatures
15+ shell : bash
16+ env :
17+ GH_TOKEN : ${{ github.token }}
18+ run : |
19+ COMMITS=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/commits \
20+ --jq '.[].sha') || {
21+ echo "::error::Failed to fetch commits from GitHub"
22+ exit 1
23+ }
24+
25+ if [ -z "$COMMITS" ]; then
26+ echo "::error::Unexpected empty commit list"
27+ exit 1
28+ fi
29+
30+ for sha in $COMMITS; do
31+ echo "Checking commit $sha"
32+ VERIFIED=$(gh api repos/${{ github.repository }}/commits/$sha --jq '.commit.verification.verified')
33+ if [ "$VERIFIED" != "true" ]; then
34+ echo "::error::Commit $sha is not verified"
35+ exit 1
36+ fi
37+ done
You can’t perform that action at this time.
0 commit comments