Check and build ALL DL4MicEverywhere #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check and build ALL DL4MicEverywhere | |
on: | |
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 | |
- name: Get the list of all the notebooks | |
id: all_notebooks | |
run: | | |
output=$(for dir in $(ls -d ./src/*/*); do echo "${dir#./src/}"; done | tr "\n" " ") | |
echo "$output" | |
echo "value=${output}" >> $GITHUB_OUTPUT | |
- if: ${{ steps.all_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.all_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 |