-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.19 KB
/
test.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
name: Test Uploading Mermaid Diagrams
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
test:
name: Example Diagrams
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install nightly
run: |
rustup set profile minimal
rustup toolchain install nightly
shell: bash
- name: build pymermaider
run: |
git clone https://github.com/diceroll123/pymermaider
cd pymermaider
cargo build --release
shell: bash
- name: run pymermaider
run: |
pymermaider/target/release/pymermaider .
cat ./output/${{ github.event.repository.name }}.md
shell: bash
- name: upload artifacts
uses: actions/upload-artifact@v2
with:
name: mermaid-diagrams
path:
./output/${{ github.event.repository.name }}.md
- name: Upload mermaid md file diagram into PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: ./output/${{ github.event.repository.name }}.md
comment_tag: 'mermaid-diagram'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}