Update the UML Diagrams #18
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
name: Update the UML Diagrams | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 12 * * 1' | ||
jobs: | ||
build: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
permissions: write-all | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Configure Git Identity | ||
run: | | ||
git config user.name "$(git log -n 1 --pretty=format:%an)" | ||
git config user.email "$(git log -n 1 --pretty=format:%ae)" | ||
- name: Update the UML Diagrams | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y graphviz | ||
make uml | ||
- name: Detect UML changes | ||
run: | | ||
git add docs/source/uml/*.png | ||
if git diff --staged --exit-code; then | ||
echo "No changes to commit" | ||
echo "changes_exist=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "changes_exist=true" >> $GITHUB_ENV | ||
fi | ||
- name: Create PR for changes | ||
if: steps.detect_changes.outputs.changes_exist == "true" | ||
Check failure on line 45 in .github/workflows/uml.yml GitHub Actions / Update the UML DiagramsInvalid workflow file
|
||
run: | | ||
git checkout -b update-uml-diagrams | ||
git commit -m "Update UML Diagrams" | ||
gh pr create \ | ||
--base main \ | ||
--head update-uml-diagrams \ | ||
--title "Update UML Diagrams" \ | ||
--body "This PR updates the UML Diagrams" \ | ||
--label "no releasenotes" \ | ||
--reviewer wd60622 \ | ||
--reviewer juanitorduz | ||
env: | ||
GH_TOKEN: ${{ github.token }} |