From f4be6dc066c79de52565bed4e6a96b329a94e570 Mon Sep 17 00:00:00 2001 From: Andrew Zhao Date: Tue, 30 Mar 2021 16:38:21 +0100 Subject: [PATCH] Update readme and version to 0.3.1 --- README.md | 6 ++++-- entrypoint.sh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 74bfeaf..6645382 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Looking for suggestions/help in improving this action. If there is a feature you ## How to use The idea is that this action is to be used within a workflow, not as a standalone action at this time. +OUTPUT_FILE_TYPE can be used to define the output file type, if you don't specify it it will default to png. You can override it to svg or pdf. ### Sample workflow with automated PR @@ -55,6 +56,7 @@ jobs: env: HIDE_CODEBLOCKS: 1 ABSOLUTE_IMAGE_LINKS: 1 + OUTPUT_FILE_TYPE: "svg" - name: show changes run: | @@ -109,14 +111,14 @@ jobs: echo ${{ steps.getfile.outputs.files }} - name: compile mermaid - uses: neenjaw/compile-mermaid-markdown-action@0.3.0 + uses: neenjaw/compile-mermaid-markdown-action@0.3.1 with: files: ${{ steps.getfile.outputs.files }} output: '.resources' env: HIDE_CODEBLOCKS: 1 ABSOLUTE_IMAGE_LINKS: 1 - RENDER_SVG: 1 + OUTPUT_FILE_TYPE: "svg" - name: show changes run: | diff --git a/entrypoint.sh b/entrypoint.sh index e4fb939..6d67c3d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -8,12 +8,12 @@ # Usage: # > entrypoint.sh [ [ ...]] -# For *.mermaid or *.mmd files, it is compiled and a *.mermaid.png is created at the location +# For *.mermaid or *.mmd files, it is compiled and a *.mermaid.${output_file_type} is created at the location # For *.md files: # 1) finds all of the mermaid markup in the file # 2) creates intermediate files in the output directory *.md..mermaid where n represents the nth block found -# 3) compile the mermaid to the directory *.md..mermaid.png +# 3) compile the mermaid to the directory *.md..mermaid.${output_file_type} # 4) place a reference to the compiled image in the markdown set -euo pipefail