-
Notifications
You must be signed in to change notification settings - Fork 7
68 lines (51 loc) · 1.8 KB
/
deptrac.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
65
66
name: Generate Deptract Modules Diagram
on:
push:
branches:
- main
- master
- develop
jobs:
deptrac-modules-diagram:
name: Generate Deptract Modules Diagram
runs-on: ubuntu-latest
container:
image: escolalms/php:8
steps:
- name: Instantiate package
uses: actions/checkout@v2
- name: Update composer
run: |
apt-get install unzip -y
composer self-update
composer update --no-scripts
composer require qossmic/deptrac-shim --no-scripts
- name: Install git & graphviz
run: |
apt-get update
apt-get install git graphviz graphviz-dev -y
- name: Generage deptrac-modules.yaml
run: php deptrac.php && mkdir deptrac
- name: Generage deptrac-diagram.yaml
run: ./vendor/bin/deptrac analyse --config-file=deptrac-modules.yaml --formatter=graphviz-image --output=deptrac/deptrac-modules.png
continue-on-error: true
- name: Archive deptrac-diagram
uses: actions/upload-artifact@v3
with:
name: deptrac-modules.png
path: deptrac/deptrac-modules.png
- name: Deploy to external repository
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.STATS_KEY }}
with:
# GitHub Action output files
source-directory: deptrac/
target-directory: deptrac
destination-github-username: EscolaLMS
destination-repository-name: .github
user-email: mateusz@qunabu.com
# It defaults to `main`
target-branch: "main"
- name: Test get variable exported by push-to-another-repository
run: echo $DESTINATION_CLONED_DIRECTORY