The Action
- SHEET
- C4
- REV
- flowfig 0.8.4
- SOURCE
- action.yml
- DATE
- 2026-10-06
The GitHub Action runs verify on every figure in a pull request. For each SVG that the PR changes, it comments the old
image, the new image and the spec changes. It also names each figure whose linked code the PR changes.
name: figureson: pull_requestjobs: figures: runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # the Action reads the old figure from the base commit - uses: actions/setup-node@v4 with: node-version: 22 - uses: iamalvisng/flowfig@v0.9.0 with: figures: 'docs/**/*.svg' # default **/*.svgInputs
Section titled “Inputs”| Input | What it does | Default |
|---|---|---|
figures |
A glob for the SVGs to check. Only an SVG with a flowfig spec inside counts. | **/*.svg |
comment |
Post one comment on the pull request with the diagram diff and the verify faults. | true |
The comment
Section titled “The comment”The Action posts one comment per pull request. On each push, it updates that comment. On a pull request from a fork, the token is read-only, so the Action posts no comment. A verify error still fails the job.
This is the comment body for a pull request that renames getCached to getEntry and renders the figure again. It is a real run of action/comment.sh:
<!-- flowfig -->## flowfig
### `docs/cached-request.svg`| before | after ||---|---||  |  |
- box changed: `cache` (source "examples/shop/cache.ts#getCached" -> "examples/shop/cache.ts#getEntry")
### Linked code changed- this PR changes `examples/shop/api.ts`, linked from `docs/cached-request.svg`. Review the figure.- this PR changes `examples/shop/cache.ts`, linked from `docs/cached-request.svg`. Review the figure.
### verify- docs/cached-request.svg: 3 of 3 boxes defined; edges: 2 found, 0 not found, 0 unsure, 1 not checked