-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.4 KB
/
compose-viz.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
name: 'Visualise docker-compose files'
on:
pull_request:
paths:
- '**/*.yml'
- '**/*.yaml'
jobs:
visualize:
name: 'Visualise docker-compose files'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
lfs: false
- name: 'Get all changed compose files'
id: changed-files
uses: tj-actions/changed-files@v45
with: # Avoid using single or double quotes for multiline patterns
files: |
**/*docker-compose*.yml
**/*docker-compose.yaml
**/compose.yaml
- name: 'Create diagrams'
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed..."
docker run --rm -i -v $(pwd):/in wst24365888/compose-viz -m svg -o "${file/.yml/''}" "$file" || continue
done
git status
- name: 'Update branch'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "update compose viz image(s)"
commit_options: ''
branch: ${{ github.head_ref }}
commit_user_name: ${{ github.actor }}
commit_user_email: ${{ github.actor }}@users.noreply.github.com
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>