svgsketch/SVGSketch Render
Render SVGSketch .svgs documents to SVG in CI/CD. Supports globs, template variables, and batch rendering.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| input | File path or glob pattern for `.svgs` files to render. Glob patterns follow @actions/glob syntax (e.g. `designs/**/*.svgs`). | no | **/*.svgs |
| output-dir | Directory to write rendered SVG files into. Source directory structure is mirrored beneath this path. When omitted, rendered files are written next to their source `.svgs` files. | no | "" |
| variables | Template variable overrides. Accepts either a JSON object (`{"color":"#f00","size":"40"}`) or newline-separated `KEY=VALUE` pairs. Variables not overridden fall back to the document's declared defaults. | no | "" |
| width | Override canvas width (pixels). Optional. | no | "" |
| height | Override canvas height (pixels). Optional. | no | "" |
| background | Background color (e.g. `#ffffff`). Adds a background `<rect>` to rendered SVGs. | no | "" |
| fail-on-warnings | Treat validation warnings as failures. Default `false` (warnings only logged). | no | false |
| comment-on-pr | Post the rendered outputs as a visual preview comment on the pull request. Requires `permissions: pull-requests: write` in the consumer workflow. Default `false`. | no | false |
| comment-format | How renders are embedded in the PR comment. `png` rasterizes each SVG to a base64 PNG embedded inline (works for small/medium images). `artifact-link` skips rasterization and posts a link to the uploaded artifact instead. Default `png`. | no | png |
| comment-max-kb | Maximum size (KB) of a single rendered PNG before the action falls back to artifact-link mode for that file, to avoid bloating the PR comment beyond GitHub's rendering limits. Default `400`. | no | 400 |
| github-token | Token used to post/update the PR comment. Defaults to the workflow's automatic GitHub token, which is sufficient for most usage. Override only if you need a different identity (e.g. a bot account) to author the comment. | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| files | JSON array of rendered output file paths (relative to the runner workspace). |
| count | Number of `.svgs` files rendered. |