Skip to content

feat: remove the internally used glue-id completely because it is no … #23

feat: remove the internally used glue-id completely because it is no …

feat: remove the internally used glue-id completely because it is no … #23

name: Build PlantUML Diagrams
on:
push:
branches:
- main
# Prevent infinite loops when workflow commits changes
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-diagrams:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Setup just
uses: extractions/setup-just@v2
- name: Get PlantUML version
id: plantuml-version
run: |
echo "version=$(cat .plantuml-version)" >> $GITHUB_OUTPUT
- name: Cache PNG diagrams
id: cache-diagrams
uses: actions/cache@v4
with:
path: diagrams/png
key: diagrams-v${{ steps.plantuml-version.outputs.version }}-${{ hashFiles('diagrams/*.puml') }}
- name: Build diagrams
if: steps.cache-diagrams.outputs.cache-hit != 'true'
run: just diagrams docker
- name: Stage diagram files
if: steps.cache-diagrams.outputs.cache-hit != 'true'
run: git add diagrams/png/*.png
- name: Check if files staged
id: check_changes
if: steps.cache-diagrams.outputs.cache-hit != 'true'
run: |
if git diff --cached --quiet; then
echo "changes_detected=false" >> $GITHUB_OUTPUT
else
echo "changes_detected=true" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: steps.cache-diagrams.outputs.cache-hit != 'true' && steps.check_changes.outputs.changes_detected == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "[Automated] Update diagram PNG files"
git push