File tree Expand file tree Collapse file tree 4 files changed +59
-3
lines changed Expand file tree Collapse file tree 4 files changed +59
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Documentation Check 📚
2+
3+ on :
4+ workflow_call :
5+ pull_request :
6+ branches :
7+ - main
8+ - dev
9+ types :
10+ - labeled
11+
12+ jobs :
13+ documentation_check :
14+ name : Documentation Check 📚
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Success
18+ if : ${{ github.event.label.name == 'documented' || contains( github.event.pull_request.labels.*.name, 'documented') }}
19+ run : echo "Documentation Check Passed"
20+ - name : Failure
21+ if : ${{ github.event.label.name != 'documented' && !contains( github.event.pull_request.labels.*.name, 'documented') }}
22+ run : |
23+ echo "Documentation Check Failed - Missing 'documented' label on Pull Request"
24+ exit 1
Original file line number Diff line number Diff line change 1616 analyze_code :
1717 name : Analyze 🧐
1818 if : ${{ github.event.action == 'ready_for_review' || github.event.label.name == 'ready-to-merge'}}
19- uses : ChainSafe/web3.unity/.github/workflows/codeql.yml@main
19+ uses : ChainSafe/web3.unity/.github/workflows/codeql.yml@main
20+ documentation_check :
21+ name : Documentation Check 📚
22+ uses : ChainSafe/web3.unity/.github/workflows/documentation_check.yml@main
Original file line number Diff line number Diff line change 1313 check_commit :
1414 name : Check Commit 📝
1515 runs-on : ubuntu-latest
16- if : ${{ !github.event.pull_request.draft }}
16+ if : ${{ !github.event.pull_request.draft && contains( github.event.pull_request.labels.*.name, 'ready-to-merge') }}
1717 outputs :
1818 commit_message : ${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }}
1919 steps :
3333 if : ${{ needs.check_commit.outputs.commit_message == 'Sync Dependencies - Auto Commit' }}
3434 needs : [ check_commit ]
3535 steps :
36- - run : echo "..."
36+ - run : echo "Proceeding to checks ..."
3737
3838 web3_tests :
3939 name : Web3 tests 🕸
4848 uses : ChainSafe/web3.unity/.github/workflows/unity_tests.yml@main
4949 needs : [ pre_job ]
5050 secrets : inherit
51+ documentation_check :
52+ name : Documentation Check 📚
53+ uses : ChainSafe/web3.unity/.github/workflows/documentation_check.yml@main
54+ needs : [ pre_job ]
5155 duplicate_samples :
5256 name : Duplicate Samples 🪞
5357 if : ${{ github.event.action == 'ready_for_review' || github.event.label.name == 'ready-to-merge'}}
Original file line number Diff line number Diff line change 55 branches : [ dev ]
66
77jobs :
8+ check_commit :
9+ name : Check Last Commit 📝
10+ runs-on : ubuntu-latest
11+ outputs :
12+ commit_message : ${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }}
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+ with :
17+ ref : ${{ github.head_ref || github.ref_name }}
18+ lfs : true
19+ ssh-key : ${{ secrets.DEPLOY_KEY }}
20+ - name : Get Head Commit Message
21+ id : get_head_commit_message
22+ run : echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"
23+
24+ pre_job :
25+ name : Pre Job 🚀
26+ runs-on : ubuntu-latest
27+ if : ${{ needs.check_commit.outputs.commit_message != 'Sync Dependencies - Auto Commit' }}
28+ needs : [ check_commit ]
29+ steps :
30+ - run : echo "Proceeding to checks..."
31+
832 sync_dependencies :
933 name : Sync Dependencies 🔄
1034 uses : ChainSafe/web3.unity/.github/workflows/sync_dependencies.yaml@main
35+ needs : [ pre_job ]
1136 secrets : inherit
1237 duplicate_samples :
1338 name : Duplicate Samples 🪞
You can’t perform that action at this time.
0 commit comments