From 3d1d328c2838e615ac7d41218f4dbc62f98624ec Mon Sep 17 00:00:00 2001 From: smeghead Date: Tue, 28 May 2024 20:14:26 +0900 Subject: [PATCH 1/2] feat: add Github Actions support. --- .github/workflows/php.yml | 21 +++++++++++++++++++++ README.md | 7 +++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 0d6515a..ca6684c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -45,3 +45,24 @@ jobs: - name: Run PHPStan run: composer phpstan + + - create-class-diagram: + runs-on: ubuntu-latest + name: Create class diagram + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create class diagram + id: create-class-diagram + uses: smeghead/php-class-diagram-gh-action@v0 + with: + target-path: src/DiagramElement + output-path: php-class-diagram.png + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Class_Diagram + path: php-class-diagram.png + retention-days: 5 diff --git a/README.md b/README.md index a6d91d4..ab6b6f4 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,13 @@ $ bin/php-class-diagram --division-diagram test/fixtures/enum/ ![PlantUML output image.](doc/images/output-division.png) +## Github Actions support + +The following repository provides actions for generating class diagrams using php-class-diagram in Github Actions workflows. + +[smeghead/php-class-diagram-gh-action](https://github.com/smeghead/php-class-diagram-gh-action) + + ## Development ### Open shell From a052e8539af04069ab823052c7749e73b40a17ab Mon Sep 17 00:00:00 2001 From: smeghead Date: Tue, 28 May 2024 20:19:52 +0900 Subject: [PATCH 2/2] fix: syntax error of workflow file. --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ca6684c..9557085 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -46,7 +46,7 @@ jobs: - name: Run PHPStan run: composer phpstan - - create-class-diagram: + create-class-diagram: runs-on: ubuntu-latest name: Create class diagram steps: