Skip to main content
Version: v1 (current)

Inputs & Outputs

tip

The Workflow Wizard lets you configure these inputs visually and generates the complete workflow YAML for you.

Inputs

InputRequiredDefaultDescription
github_tokenYes${{ github.token }}GitHub token for API access — issues, releases, and repository metadata. Not used for question generation
ai_providerNoopenrouterAI provider. openrouter is the only supported value, so this can be omitted
ai_modelNogoogle/gemini-3.5-flash-liteModel identifier in OpenRouter provider/model-name format. See openrouter.ai/models
ai_retry_max_attemptsNo5Total number of attempts (initial + retries) when calling the AI provider. Retries are triggered by transient errors: 429 (rate limit), 500, 502, 503, 504, and network-level failures. Values below 1 are clamped to 1
ai_temperatureNo0.5Controls the randomness of the AI's output (0.0 = fully deterministic, 1.0 = most random). Lower values produce more consistent questions; higher values produce more varied output
api_keyYesOpenRouter API key. Required — github_token cannot be used for question generation, and the action fails immediately if this is empty. Create one at openrouter.ai/keys
num_questionsNo20Number of questions to generate (minimum 1, maximum 50). Values above 50 are automatically capped
include_answersNofalseWhen true, each question is immediately followed by its answer labelled Answer: in the student-facing report — meaning the student sees the answers. This defeats the purpose of the assessment, which is for the student to work out the answers themselves. Leave this false in almost all cases. The instructor repository (when instructor_repo_token is configured) always includes answers regardless of this setting
exclude_pattern_overridesNoComma-separated entries to re-include files excluded by auto-detection or additional_exclude_patterns. Each entry can be an exact pattern (e.g. **/*.md) to re-include all files of that type, or a specific file path (e.g. README.md) to allow only that file through. Note: binary files are always skipped regardless of overrides
additional_exclude_patternsNoComma-separated globs for extra files to exclude on top of the auto-detected stack patterns. Use for assignment-specific files (starter code, fixtures, data files) that the auto-detected templates wouldn't cover
instructor_repo_tokenNoClassroom 50 assignment repositories only. PAT with repo and workflow scopes and permission to create repositories in the same organisation. When provided, the action writes a private instructor-only assessment file (questions and answers) to a repository named {assignment-name}-grillmycode-instructor in the same organisation. The repository is created automatically on first run, and its quiz-generation workflow and README are refreshed on every run whenever they differ from the copies shipped with the action. The assignment name and the student's folder are read from the Classroom 50 repository name (<classroom>-<assignment>-<username>) and the repository's direct collaborators — see how the assignment and student are identified. Any other repository skips instructor delivery with a warning. Leave empty to disable instructor repository delivery
instructor_contextNoInstructor-specific instructions for this assignment. Injected into the system prompt and takes precedence over default behaviour. Supports multi-line instructions. When set, the AI also generates a one-sentence summary of the question focus, shown as an Instructor Note in the report header
assignment_contextNoComma-separated file glob(s) read from the repository and injected into the AI prompt before instructor_context. Supported file types: plain text / source files (UTF-8), PDF (.pdf — text layer only), Microsoft Word (.doc/.docx — text only). If no files match, a workflow warning is emitted and the action continues without context. Example: "README.md, docs/brief.pdf, rubric.docx"
assignment_context_max_charsNo20000Maximum total characters read from all assignment_context files combined. Prevents large files from flooding the prompt. Values below 1 are clamped to 1
keep_commentsNofalseWhen false (default), inline and block comments are stripped before sending code to the AI. Set to "true" to preserve comments
fail_on_empty_assessmentNofalseWhen true, a run that finds nothing to assess fails instead of succeeding. Both causes (empty commit range; every changed file excluded) occur normally at assignment-accept time, so this is opt-in. The run summary explains the reason either way
include_initial_commitNofalseWhen false (default), pins the diff base to the first commit so starter/template files are excluded. When true, uses the empty tree as the base so the initial commit's eligible files are included in the diff. Set true for Classroom 50 empty-repository assignments — see the Classroom 50 guide
skip_committersNogithub-actions[bot]Comma-separated list of commit author names or email substrings. Leading bot commits after the base SHA are excluded from the diff. Classroom 50's accept-time setup commit is authored under the student's own identity, not a bot, so this input has no leading commit to match there (see Classroom 50); its .classroom50.yaml file is excluded by pattern instead. Set to '' to disable
base_shaNoOverride the base commit SHA
head_shaNoOverride the head commit SHA

Outputs

OutputDescription
issue_urlURL of the created or updated assessment issue
issue_numberNumber of the created or updated assessment issue
pdf_urlDownload URL of the assessment PDF release asset. Empty if PDF generation failed
questionsThe generated questions as a string (internal AI markers stripped; does not include the instructor note)
code_before_stripFull code content of all assessed files before comment stripping
code_after_stripFull code content of all assessed files after comment stripping

Using outputs in subsequent steps

Give the action step an id, then reference its outputs with steps.<id>.outputs.<name>:

- uses: NSCC-ITC-Assessment/GrillMyCode@v1
id: assess
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
api_key: ${{ secrets.OPENROUTER_API_KEY }}

- name: Print issue link
run: echo "Assessment issue ${{ steps.assess.outputs.issue_url }}"

- name: Print questions
run: echo "${{ steps.assess.outputs.questions }}"

- name: Comment character count
run: |
echo "Code before stripping: $(echo "${{ steps.assess.outputs.code_before_strip }}" | wc -c) chars"
echo "Code after stripping: $(echo "${{ steps.assess.outputs.code_after_strip }}" | wc -c) chars"