diff --git a/.github/workflows/automaticBuilding.yml b/.github/workflows/automaticBuilding.yml index ad84670b..6ff11fb7 100644 --- a/.github/workflows/automaticBuilding.yml +++ b/.github/workflows/automaticBuilding.yml @@ -14,6 +14,20 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 # Fetch full history for branches + + - name: Checking out the correct branches for submodules + run: | + git submodule foreach ' + if [ "$name" = "pythonCode/submodules/MEDimage" ]; then + git fetch origin && git checkout -B dev_lab origin/dev_lab && git pull origin dev_lab + elif [ "$name" = "pythonCode/submodules/MEDprofiles" ]; then + git fetch origin && git checkout -B fusion_MEDomicsLab origin/fusion_MEDomicsLab && git pull origin fusion_MEDomicsLab + else + echo "No branch specified for $name" + fi + ' + - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -72,6 +86,19 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 # Fetch full history for branches + + - name: Checking out the correct branches for submodules + run: | + git submodule foreach ' + if [ "$name" = "pythonCode/submodules/MEDimage" ]; then + git fetch origin && git checkout -B dev_lab origin/dev_lab && git pull origin dev_lab + elif [ "$name" = "pythonCode/submodules/MEDprofiles" ]; then + git fetch origin && git checkout -B fusion_MEDomicsLab origin/fusion_MEDomicsLab && git pull origin fusion_MEDomicsLab + else + echo "No branch specified for $name" + fi + ' - name: Set up Node.js uses: actions/setup-node@v4 @@ -134,6 +161,20 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + fetch-depth: 0 # Fetch full history for branches + + - name: Checking out the correct branches for submodules + run: | + git submodule foreach ' + if [ "$name" = "pythonCode/submodules/MEDimage" ]; then + git fetch origin && git checkout -B dev_lab origin/dev_lab && git pull origin dev_lab + elif [ "$name" = "pythonCode/submodules/MEDprofiles" ]; then + git fetch origin && git checkout -B fusion_MEDomicsLab origin/fusion_MEDomicsLab && git pull origin fusion_MEDomicsLab + else + echo "No branch specified for $name" + fi + ' + - name: Setup Go uses: actions/setup-go@v4 with: