WIP #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Render all plantuml and drawio diagrams. If the rendered result produces | |
# a diff, the result is committed. | |
# This process relies on unmodified diagrams being rendered by the same version | |
# of the tools to produce identical results. | |
on: | |
push: | |
paths: | |
- "docs/Taskfile.yml" | |
- ".github/workflows/diagrams-render.yaml" | |
- "docs/diagrams/*.puml" | |
- "docs/diagrams/*.drawio" | |
- "tools/plantuml/*" | |
name: Render diagrams | |
jobs: | |
render_diagrams: | |
name: Render Drawio diagrams | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3.5.3 | |
- name: Install Task | |
uses: Arduino/actions/setup-taskfile@master | |
- name: Clean render | |
working-directory: docs | |
run: task clean render | |
- name: Get author and committer info from HEAD commit | |
run: | | |
set -o xtrace | |
{ | |
echo "GIT_COMMIT_AUTHOR="$(git log -1 --pretty=format:"%an <%ae>" HEAD)"" | |
echo "GIT_COMMIT_COMMITTER_NAME="$(git log -1 --pretty=format:"%cn" HEAD)"" | |
echo "GIT_COMMIT_COMMITTER_EMAIL="$(git log -1 --pretty=format:"%ce" HEAD)"" | |
} >>"$GITHUB_ENV" | |
- name: Commit changed files | |
uses: stefanzweifel/git-auto-commit-action@v4.16.0 | |
with: | |
commit_message: "diagrams: re-render of updated diagrams" | |
commit_user_name: "${{ env.GIT_COMMIT_COMMITTER_NAME }}" | |
commit_user_email: "${{ env.GIT_COMMIT_COMMITTER_EMAIL }}" | |
commit_author: "${{ env.GIT_COMMIT_AUTHOR }}" |