-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathgithub_actions_cicd.d2
executable file
·126 lines (110 loc) · 3.24 KB
/
github_actions_cicd.d2
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/usr/bin/env d2 --theme 200 --layout elk
#
# Author: Hari Sekhon
# Date: 2023-05-03 18:50:11 +0100 (Wed, 03 May 2023)
#
# vim:ts=2:sts=2:sw=2:et:filetype=d2
#
# https://github.com/HariSekhon/Diagrams-as-Code
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
direction: right
# this is just a regular object
title: {
label: GitHub Actions CI/CD - Auto-(Re)Generate Diagrams
near: top-center
shape: text
style.font-size: 40
style.underline: true
}
hari: "Hari\nPythonista" {
icon: images/hari.jpeg
shape: image
# style {
# bold: false # have to unbold because it is default for shape labels and takes priority over italic
# italic: true
# }
}
Giovanni: {
icon: images/rolling_eyes.png
shape: image
}
Ravi: {
icon: images/man-shrugging-medium-skin-tone.png
shape: image
}
You: {
icon: images/flushed-face.png
shape: image
}
python: Python {
icon: https://icons.terrastruct.com/dev%2Fpython.svg
shape: image
}
d2: D2 {
icon: images/d2_graphic.png
shape: image
}
slack: Slack {
icon: https://icons.terrastruct.com/dev%2Fslack.svg
shape: image
}
Banned by Giovanni: {
style.border-radius: 20
Do Not Use: {
style.border-radius: 20
jenkins: Jenkins {
icon: https://diagrams.mingrammer.com/img/resources/onprem/ci/jenkins.png
shape: image
}
# XXX: must use <- and not -> here to ensure the jenkins is put to the left and doesn't mess up the diagram - at least with ELK engine
jenkins <- _._.giovanni: {
label: banned
style.stroke-dash: 5
}
}
}
hari -> python: crazy midnight to 4am coding {style.animated: true}
hari -> d2: crazy midnight to 4am coding {style.animated: true}
hari -> slack: "Hey Guys,\nlooks what\nI just did\nthis weekend!"
giovanni -> slack: "Hari is doing his\n\"rain man\"\nthing again..."
ravi -> slack: Hey, what did I miss?
python -> git: git commit {style.animated: true}
d2 -> git: git commit {style.animated: true}
git: Git {
icon: https://icons.terrastruct.com/dev%2Fgit.svg
shape: image
}
github: GitHub {
style.border-radius: 20
_.git -> github_repo: git push {style.animated: true}
# github: GitHub {
# icon: https://icons.terrastruct.com/dev%2Fgithub.svg
# shape: image
# }
github_repo: "Diagrams-as-Code\nrepo" {
icon: https://icons.terrastruct.com/dev%2Fgithub.svg
shape: image
}
cicd: "GitHub Actions\nCI/CD" {
style.border-radius: 20
d2: "Generate D2\nImages workflow" {
icon: https://diagrams.mingrammer.com/img/resources/onprem/ci/github-actions.png
shape: image
}
python: "Generate Python\nImages workflow" {
icon: https://diagrams.mingrammer.com/img/resources/onprem/ci/github-actions.png
shape: image
}
_.github_repo -> d2: "*.d2 changes\ntrigger workflow" {style.animated: true}
_.github_repo -> python: "*.py changes\ntrigger workflow" {style.animated: true}
d2 -> _.github_repo: "git commit\nnew / updated diagrams" {style.animated: true}
python -> _.github_repo: "git commit\nnew / updated diagrams" {style.animated: true}
}
github_repo -> "README.md" <- _.You
}