ateeducacion/Moodle Playground PR Preview

Automatically add a "Preview in Moodle Playground" button to your pull requests for easy testing of Moodle plugins.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 4, 2026
License
GPL 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: ateeducacion/action-moodle-playground-pr-preview@bfa63e4863a8cf9d6ac9394bd83f8669000dfd51 # v1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
modeHow to publish the preview button: `append-to-description` or `comment`append-to-description
playground-hostBase Moodle Playground host URLhttps://moodle-playground.com
blueprintCustom Moodle Playground Blueprint as a JSON string. When provided, `plugin-path` is ignored.
blueprint-filePath to a local blueprint JSON file (requires actions/checkout). The action auto-replaces installMoodlePlugin and installTheme github.com archive URLs whose repo name matches the current repo (owner is ignored) with the PR branch archive URL.
blueprint-urlURL pointing to a remote blueprint. When provided, the Playground link uses `?blueprint-url={url}` directly.
proxy-urlBase URL of a github-proxy able to serve a single repo file with CORS (its `?repo=&branch=&path=` mode, e.g. https://github-proxy.exelearning.dev/). When set together with `blueprint-file`, the preview links to that file on the PR branch via `?blueprint-url=` instead of inlining the blueprint as base64 — keeping the URL short and avoiding HTTP 414 on large blueprints. The blueprint should use `{{REPO}}`/`{{REF}}` placeholders so the Playground installs the plugin from the PR branch.
plugin-pathPath to plugin directory inside the repository (e.g., `.` for root). Used to generate an installMoodlePlugin blueprint step.
moodle-versionMoodle version for the blueprint (e.g., "5.0", "4.4")5.0
preview-typePreview type: auto, plugin, or coreauto
base-versionOverride Moodle Playground base version for core PR overlay previews
run-upgradeUpgrade handling for core PR overlays: off, on, or autoauto
core-rootMoodle filesystem root inside Moodle Playground/www/moodle
max-core-filesMaximum number of changed files allowed in core overlay previews80
max-core-file-bytesMaximum size in bytes per changed file for core overlay previews262144
allow-core-binary-filesWhether to allow binary files in core overlay previewsfalse
core-pr-modeHow to apply Moodle core PR changes. Currently only files is supported.files
description-templateCustom markdown/HTML template for PR descriptions (supports {{VARIABLE_NAME}} interpolation)
comment-templateCustom markdown/HTML template for PR comments (supports {{VARIABLE_NAME}} interpolation)
extra-textOptional text/HTML to display after the preview button (e.g., testing instructions). Also available as {{EXTRA_TEXT}} in custom templates.
restore-button-if-removedWhether to restore the preview button if removed by PR author (only applies to `append-to-description` mode)true
github-tokenGitHub token for updating PRs (defaults to GITHUB_TOKEN). Required permissions: `pull-requests: write`, `contents: read`
pr-numberPull request number (optional, defaults to context.payload.pull_request.number). When provided, all PR details will be fetched from the GitHub API.
namedescription
preview-urlDirect link to the generated Moodle Playground instance.
blueprint-jsonJSON blueprint (stringified) used for the preview.
rendered-descriptionMarkdown/HTML snippet inserted into the PR description.
rendered-commentMarkdown/HTML snippet used when posting a comment.
modeEffective preview publishing mode (append-to-description or comment).
comment-idID of the managed preview comment (if applicable).