diff --git a/.github/actions/checkout/action.yml b/.github/actions/checkout/action.yml new file mode 100644 index 000000000..781d62cf9 --- /dev/null +++ b/.github/actions/checkout/action.yml @@ -0,0 +1,36 @@ +name: "Checkout submodule" +description: "Checkout specific repository and branch otherwise, it checkout master" +inputs: + branch: + description: "Branch to checkout" + required: true + repository: + description: "Repository" + required: true + path: + description: "Path" + required: true + +runs: + using: "composite" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + repository: ${{ inputs.repository }} + path: ${{ inputs.path }} + - name: Checkout repository branch + id: repositoryBranch + run: | + cd ${{ inputs.path }} + var=$(git ls-remote --heads origin ${{ inputs.branch }}) + if [[ -z $var ]]; then + echo "Branch "${{ inputs.branch }}" not found in " ${{ inputs.repository }} + echo "exist=false" >> $GITHUB_OUTPUT + else + echo "Branch "${{ inputs.branch }}" found in " ${{ inputs.repository }} + git fetch + git checkout ${{ inputs.branch }} + git pull + fi + shell: bash diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index d94f2de2c..22ee5c09b 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -634,3 +634,27 @@ jobs: name: AlphaTrack path: ${{ env.REST_PATH }}/examples/restG4/08.Alphas/data/Run_5MeV_1um.root retention-days: 1 + + rawlib-validation: + uses: rest-for-physics/rawlib/.github/workflows/validation.yml@submodule-validation + + geant4lib-validation: + uses: rest-for-physics/geant4lib/.github/workflows/validation.yml@submodule-validation + + detectorlib-validation: + uses: rest-for-physics/detectorlib/.github/workflows/validation.yml@submodule-validation + + connectorslib-validation: + uses: rest-for-physics/connectorslib/.github/workflows/validation.yml@submodule-validation + + tracklib-validation: + uses: rest-for-physics/tracklib/.github/workflows/validation.yml@submodule-validation + + legacylib-validation: + uses: rest-for-physics/legacylib/.github/workflows/validation.yml@submodule-validation + + axionlib-validation: + uses: rest-for-physics/axionlib/.github/workflows/validation.yml@submodule-validation + + wimplib-validation: + uses: rest-for-physics/wimplib/.github/workflows/validation.yml@submodule-validation