Skip to content

Commit 53edf4d

Browse files
committed
write mermaid diagram to output
1 parent 4e8bbb2 commit 53edf4d

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/workflows/manual.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ jobs:
3636
github-token: '${{ secrets.GITHUB_TOKEN }}'
3737
include-legend: '${{ github.event.inputs.include-legend }}'
3838
include-finish-node: '${{ github.event.inputs.include-finish-node }}'
39-
dry-run: '${{ github.event.inputs.dry-run }}'
39+
dry-run: '${{ github.event.inputs.dry-run }}'
40+
41+
- run: |
42+
'${{ steps.build-issue-dependencies-graph.mermaid-diagram }}' > $GITHUB_OUTPUT

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ inputs:
2323
description: 'Set this option to not update root issue with updated mermaid diagram and only print new diagram to output'
2424
required: false
2525
default: 'false'
26+
outputs:
27+
mermaid-diagram:
28+
description: 'Rendered markdown with mermaid diagram'
2629
runs:
2730
using: 'node16'
2831
main: 'dist/index.js'

dist/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ const run = async () => {
281281
const graph = graphBuilder.getGraph();
282282
const renderedContent = mermaidRender.render(graph);
283283
core.info("Rendering dependency graph into mermaid...");
284+
core.setOutput("mermaid-diagram", renderedContent);
284285
core.startGroup("Mermaid diagram");
285286
core.info(renderedContent);
286287
core.endGroup();

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ const run = async (): Promise<void> => {
3232
const renderedContent = mermaidRender.render(graph);
3333

3434
core.info("Rendering dependency graph into mermaid...");
35+
core.setOutput("mermaid-diagram", renderedContent);
3536
core.startGroup("Mermaid diagram");
3637
core.info(renderedContent);
3738
core.endGroup();
38-
39+
3940
core.info("Preparing updated root issue content...");
4041
const updatedIssueContent = issueContentParser.replaceIssueContent(
4142
rootIssue,

0 commit comments

Comments
 (0)