Skip to content

Update create-diagram.yml #1568

Update create-diagram.yml

Update create-diagram.yml #1568

name: Create diagram
on:
workflow_dispatch: {}
push:
branches:
- master
jobs:
get_data:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install repo-visualizer
run: npm install -g repo-visualizer
- name: Generate diagram
run: |
repo-visualizer \
--repo-path . \
--output diagram.svg \
--exclude "ignore,.github"
- name: Commit diagram changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -B update-diagram
git add diagram.svg
git commit -m "Repo visualizer: update diagram" || echo "No changes to commit"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: update-diagram
title: "Repo visualizer: update diagram"
body: "Automated update of the repo diagram"
base: master