-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (91 loc) · 2.78 KB
/
main.yaml
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
name: Main Workflow Using Reusable Workflow
on:
push:
paths:
- biobb_wf_ligand_parameterization/python/workflow.env.yml
- biobb_wf_md_setup/python/workflow.env.yml
workflow_dispatch:
jobs:
filter-files:
name: Filter Files
runs-on: self-hosted
outputs:
biobb_wf_ligand_parameterization_changed: ${{ steps.filter.outputs.biobb_wf_ligand_parameterization }}
biobb_wf_md_setup_changed: ${{ steps.filter.outputs.biobb_wf_md_setup }}
steps:
- name: Filter Changed Files
id: filter
uses: dorny/paths-filter@v2
with:
filters: |
biobb_wf_ligand_parameterization:
- "biobb_wf_ligand_parameterization/python/workflow.env.yml"
biobb_wf_md_setup:
- "biobb_wf_md_setup/python/workflow.env.yml"
biobb_wf_ligand_parameterization:
name: Run Tests biobb_wf_ligand_parameterization
needs: filter-files
uses: ./.github/workflows/reusable.yaml
with:
# test_name: TEST biobb_wf_ligand_parameterization
# file: biobb_wf_ligand_parameterization
wf_name: biobb_wf_ligand_parameterization
if: needs.filter-files.outputs.biobb_wf_ligand_parameterization_changed == 'true'
biobb_wf_md_setup:
name: Run Tests biobb_wf_md_setup
needs: filter-files
uses: ./.github/workflows/reusable.yaml
with:
# test_name: TEST biobb_wf_md_setup
# file: biobb_wf_md_setup
wf_name: biobb_wf_md_setup
if: needs.filter-files.outputs.biobb_wf_md_setup_changed == 'true'
# test2:
# name: Run Test2
# uses: ./.github/workflows/reusable.yaml
# with:
# test_name: Test2
# file: file2
# if: contains(github.event.commits.*.modified, 'file2')
# name: Main Workflow Using Reusable Workflow
# on:
# push:
# paths:
# - file1
# - file2
# workflow_dispatch:
# jobs:
# filter-files:
# name: Filter Files
# runs-on: ubuntu-latest
# outputs:
# file1_changed: ${{ steps.filter.outputs.file1 }}
# file2_changed: ${{ steps.filter.outputs.file2 }}
# steps:
# - name: Filter Changed Files
# id: filter
# uses: dorny/paths-filter@v2
# with:
# filters:
# file1:
# - "file1"
# file2:
# - "file2"
# test1:
# name: Run Test1
# runs-on: ubuntu-latest
# needs: filter-files
# if: needs.filter-files.outputs.file1_changed == 'true'
# uses: ./.github/workflows/reusable-test.yaml
# with:
# test_name: Test1
# file: file1
# test2:
# name: Run Test2
# runs-on: ubuntu-latest
# needs: filter-files
# if: needs.filter-files.outputs.file2_changed == 'true'
# uses: ./.github/workflows/reusable-test.yaml
# with:
# test_name: Test2
# file: file2