-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.83 KB
/
createPlantUmlWithDiff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This is a basic workflow to help you get started with Actions
name: create PlantUML CI with diff
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
diagrams:
name: Draw diagrams
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: nrwl/last-successful-commit-action@v1
id: last_successful_commit
with:
workflow_id: 'createPlantUmlWithDiff.yml'
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: haya14busa/action-cond@v1
id: check_condition
with:
cond: ${{ steps.last_successful_commit.outputs.commit_hash != '' }}
if_true: steps.last_successful_commit.outputs.commit_hash
if_false: "."
- name: Get changed files
id: changed-files
run: |
echo "::set-output name=all_changed_files::$(git diff --name-only --diff-filter=ACMRT ${{ steps.check_condition.output.value }}..HEAD *.puml | xargs)"
- name: Generate SVG Diagrams
uses: holowinski/plantuml-github-action@main
with:
args: -v -o images -tsvg ${{ steps.changed-files.outputs.all_changed_files }}
- name: Generate PNG Diagrams
uses: holowinski/plantuml-github-action@main
with:
args: -v -o images -tpng ${{ steps.changed-files.outputs.all_changed_files }}
- name: show structure
run: |
tree
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: plant uml images
path: src/plantuml/