-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (66 loc) · 2.45 KB
/
check_dl4mic_versions.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
67
68
69
70
71
name: Check and build updated DL4MicEverywhere
on:
# At 01:30 AM of every day
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
jobs:
check_notebooks:
name: Get the configurations from notebooks that need to be updated
outputs:
matrix: ${{ steps.create_json.outputs.matrix }}
runs-on: [self-hosted, dl4miceverywhere-builder]
steps:
- name: Clone actual DL4MicEverywhere-album repository
uses: actions/checkout@v4
with:
path: DL4MicEverywhere-album
- name: Clone DL4MicEverywhere repository
uses: actions/checkout@v4
with:
repository: HenriquesLab/DL4MicEverywhere
path: DL4MicEverywhere
- uses: actions/setup-python@v5
with:
python-version: '3.9'
# cache: 'pip' # caching pip dependencies
- name: Install requirements
working-directory: ./DL4MicEverywhere-album
run: pip install -r .tools/requirements.txt
- name: Check for updates on the notebooks
working-directory: ./DL4MicEverywhere-album
id: updated_notebooks
run: |
output=$(python3 .tools/python_tools/check_dl4mic_versions.py)
echo "$output"
echo "value=$output" >> $GITHUB_OUTPUT
- if: ${{ steps.updated_notebooks.outputs.value != '' }}
name: List and extract all notebook with new version
id: create_json
run: |
echo "Start"
files_json="{\"include\":[{\"notebook\":\""
echo "$files_json"
first=true
for file in ${{ steps.updated_notebooks.outputs.value }}; do
echo "$file was changed"
if [ "$first" = true ]; then
files_json+=$file
first=false
else
files_json+="\"},{\"notebook\":\""$file
fi
echo "$files_json"
done
files_json+="\"}]}"
echo "$files_json"
echo "matrix=$files_json" >> $GITHUB_OUTPUT
echo "END"
test_deploy_solutions:
if: ${{ needs.check_notebooks.outputs.matrix != '' }}
name: Call the testing and deploying the solutions
needs: check_notebooks
uses: ./.github/workflows/aux_test_deploy_solution_list.yml # calls the one above ^
with:
matrix_json: ${{ needs.check_notebooks.outputs.matrix }}
secrets: inherit