forked from NordSecurity/libtelio
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 991 Bytes
/
diagram.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
name: Diagram
on:
pull_request:
types: [opened, synchronize]
paths:
- 'nat-lab/docker-compose.yml'
jobs:
check-diagram:
runs-on: ubuntu-latest
steps:
# Checkout nat-lab files
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: nat-lab
# Generate diagram by running the script
- name: Generate network.md
run: |
python3 utils/generate_network_diagram.py docker-compose.yml network.md
working-directory: nat-lab
# Chech that the diagram was updated
- name: Compare network.md diagram
run: |
if git diff --quiet network.md; then
echo "\`network.md\` diagram up to date"
else
echo "\`network.md\` diagram not updated"
echo "Please execute \`python3 utils/generate_network_diagram.py docker-compose.yml network.md\`"
exit 1
fi
working-directory: nat-lab