diff --git a/action.yaml b/action.yaml index b871e40..a387f43 100644 --- a/action.yaml +++ b/action.yaml @@ -53,18 +53,19 @@ runs: - name: Render Diagrams env: FILE_NAME: ${{ inputs.filename }} - TARGET_PATH: ${{ github.workspace }}/${{ inputs.target-clone-dir }}/${{ inputs.path }} + TARGET_PATH: ${{ inputs.target-clone-dir }}/${{ inputs.path }} run: | mkdir -p $TARGET_PATH/mermaid - docker run --rm -v $PWD:/usr/local/structurizr structurizr/cli export -f mermaid -w $FILE_NAME -o $TARGET_PATH/mermaid + docker run --rm -v $PWD:/usr/local/structurizr structurizr/cli export -f mermaid -w $FILE_NAME -o $TARGET_PATH/mermaid + echo "of mermaid files" + ls $TARGET_PATH/mermaid + ${{ github.action_path }}/run.sh shell: bash - - name: Render Markdown - shell: bash - working-directory: ${{ github.workspace }}/${{ inputs.target-clone-dir }}/${{ inputs.path }} - run: ${{ github.action_path }}/run.sh - - + # - name: Render Markdown + # shell: bash + # working-directory: + # run: - name: commit shell: bash diff --git a/run.sh b/run.sh index 12d759b..4b60112 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,6 @@ #!/bin/bash +cd $TARGET_PATH + rm -rf ./md mkdir ./md @@ -8,11 +10,12 @@ rm $INDX echo "# Ukama C4 Diagrams" >> $INDX echo "" >> $INDX + echo "Current dir: " $(pwd) echo "Current files:" ls echo List of mermaid files: -ls $PWD/mermaid +ls $PWD/mermaid for file in $PWD/mermaid/*.mmd; do file_only=${file##*/} name=${file_only%.mmd}