diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2be1d545..c70e0de2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,3 +23,17 @@ jobs: run: npm install - name: Run the linter run: ./lint + - name: Create the diagram + run: ./diagram > diagram.md + - name: Save the diagram + run: | + git add diagram.md + git status + git remote -v + new_branch="${{ github.ref_name }}-diagram" + git branch -D "${new_branch}" || : + git checkout -b "${new_branch}" + git config user.name "${{ github.workflow }}" + git config user.email "github-actions@example.com" + git commit -m "Diagram saved by lint.yml workflow" + git push --set-upstream "$( git remote )" --force "${new_branch}" diff --git a/diagram b/diagram new file mode 100755 index 00000000..8d11551f --- /dev/null +++ b/diagram @@ -0,0 +1,15 @@ +#!/bin/bash + +set -euo pipefail + +cat <B; + A-->C; + B-->D; + C-->D; + D-->E; + E["generated at $( date )"] +\`\`\` +MERMAID