File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ # Just check for 5 commits on main :(
2+ name : Mozilla Website Autograder
3+ on :
4+ - push
5+ - workflow_dispatch
6+ - repository_dispatch
7+ permissions :
8+ contents : read
9+ actions : read
10+ checks : write
11+ jobs :
12+ run-autograding-tests :
13+ runs-on : ubuntu-latest
14+ if : github.actor != 'github-classroom[bot]'
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+ - name : Check commits
21+ id : check-commits
22+ uses : classroom-resources/autograding-command-grader@v1
23+ with :
24+ test-name : Check commits
25+ command : |
26+ REPO="${{ github.repository }}"
27+ REPO="${REPO##*/}"
28+ STUDENT="${REPO##*-}"
29+ COUNT=$(git log main --author="$STUDENT" --pretty=oneline | wc -l | tr -d ' ')
30+ echo "Student: $STUDENT"
31+ echo "Commit count on main: $COUNT"
32+ [ "$COUNT" -ge 5 ]
33+ timeout : 2
34+ max-score : 10
35+ - name : Autograding Reporter
36+ uses : classroom-resources/autograding-grading-reporter@v1
37+ env :
38+ CHECK-COMMITS_RESULTS : " ${{steps.check-commits.outputs.result}}"
39+ with :
40+ runners : check-commits
You can’t perform that action at this time.
0 commit comments