@@ -2,6 +2,11 @@ name: build-product
22
33on :
44 workflow_call :
5+ inputs :
6+ timeout :
7+ description : " Timeout in minutes for each job"
8+ required : true
9+ default : 30
510 secrets :
611 DATAVISYN_BOT_REPO_TOKEN :
712 required : false
5863 create_workspace : ${{ steps.get-parameters.outputs.create_workspace }}
5964 stage : ${{ steps.get-parameters.outputs.stage }}
6065 runs-on : ubuntu-20.04
66+ timeout-minutes : ${{ fromJSON(github.event.inputs.timeout) }}
6167 steps :
6268 # checkout specific repository
6369 - uses : actions/checkout@v3
8894 time_zone : ${{ env.TIME_ZONE }}
8995 build-single :
9096 needs : prepare-build
97+ timeout-minutes : ${{ fromJSON(github.event.inputs.timeout) }}
9198 if : ${{ needs.prepare-build.outputs.create_workspace != 'true' && needs.prepare-build.outputs.components != '[]' && needs.prepare-build.outputs.components != ''}}
9299 strategy :
93100 fail-fast : true
@@ -103,6 +110,7 @@ jobs:
103110 secrets : inherit
104111 build-workspace :
105112 needs : prepare-build
113+ timeout-minutes : ${{ fromJSON(github.event.inputs.timeout) }}
106114 if : ${{ needs.prepare-build.outputs.create_workspace == 'true' && needs.prepare-build.outputs.components != '[]' && needs.prepare-build.outputs.components != ''}}
107115 strategy :
108116 fail-fast : true
@@ -118,6 +126,7 @@ jobs:
118126 secrets : inherit
119127 post-build :
120128 needs : [prepare-build, build-single, build-workspace]
129+ timeout-minutes : ${{ fromJSON(github.event.inputs.timeout) }}
121130 if : ${{ always() && (needs.build-single.result == 'success' || needs.build-single.result == 'skipped') && (needs.build-workspace.result == 'success' || needs.build-workspace.result == 'skipped') && !(needs.build-workspace.result == 'skipped' && needs.build-single.result == 'skipped')}}
122131 runs-on : ubuntu-20.04
123132 steps :
@@ -139,6 +148,7 @@ jobs:
139148 # Add always() as otherwise the job is being skipped: https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
140149 if : ${{ always() && needs.post-build.result == 'success' && fromJSON(needs.prepare-build.outputs.trigger_automatic_deployment) }}
141150 runs-on : ubuntu-20.04
151+ timeout-minutes : ${{ fromJSON(github.event.inputs.timeout) }}
142152 strategy :
143153 matrix :
144154 customer : ${{ fromJSON(needs.prepare-build.outputs.customers) }}
0 commit comments