-
-
Notifications
You must be signed in to change notification settings - Fork 240
64 lines (51 loc) · 2.14 KB
/
diagrams.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
54
55
56
57
58
59
60
61
62
63
64
name: diagrams
on:
workflow_dispatch:
jobs:
diagrams:
runs-on: ubuntu-latest
name: "Create class diagrams of all packages"
steps:
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 # pin@v1
with:
sdk: stable
- uses: actions/checkout@v4
- name: dependencies
run: |
dart pub global activate lakos
sudo apt update
sudo apt install graphviz
- name: dart
working-directory: ./dart
run: lakos . -i "{test/**,example/**,example_web/**}" | dot -Tsvg -o class-diagram.svg
- name: flutter
working-directory: ./flutter
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
- name: dio
working-directory: ./dio
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
- name: file
working-directory: ./file
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
- name: sqflite
working-directory: ./sqflite
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
- name: logging
working-directory: ./logging
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
- name: hive
working-directory: ./hive
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
- name: isar
working-directory: ./isar
run: lakos . -i "{test/**,example/**}" | dot -Tsvg -o class-diagram.svg
# Source: https://stackoverflow.com/a/58035262
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore
# we need to pass the current branch, otherwise we can't commit the changes.
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs.
- name: Commit & push
run: ./scripts/commit-code.sh ${{ steps.extract_branch.outputs.branch }} "Update class diagrams"