record-manager-template/.forgejo/workflows/grade.yml
trevon 3a7613a5f7
Some checks failed
grade / grade (push) Failing after 4s
use org actions secret for grading
2026-08-26 01:25:41 +00:00

32 lines
1.2 KiB
YAML

name: grade
on: [push]
# Production wiring (forgejo-runner on ghost):
# - forgejo-runner v13: docker_host: automount -> the job container gets the
# host docker socket, so docker_grade.sh drives the host daemon as designed
# - hidden tests mount from the runner host via the nested docker run
# (-v /opt/grade-hidden/...) — never in this repo
# - GRADE_HMAC_SECRET is a Forgejo org/repo Actions secret (set via API),
# injected with ${{ secrets.GRADE_HMAC_SECRET }}
jobs:
grade:
runs-on: docker
container:
image: gitea/runner-images:ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Grade (blank fails, solved passes)
env:
GRADE_HMAC_SECRET: ${{ secrets.GRADE_HMAC_SECRET }}
run: |
docker run --rm --network=none \
-v "$PWD":/work \
-v /opt/grade-hidden/cs2060/record-manager:/hidden:ro \
-e GRADE_HMAC_SECRET \
grade-c:dev \
python3 /opt/grade/grade_cli.py run \
--student /work --hidden /hidden \
--course CS2060 --assignment record-manager \
--out /work/results.json
echo "--- signed result summary ---"
head -c 400 results.json