Skip to content

Commit 8b7fdd6

Browse files
authored
Add timeout input (#20)
1 parent 20208fc commit 8b7fdd6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/pipeline.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ on:
115115
required: false
116116
type: string
117117

118+
timeout_minutes:
119+
required: false
120+
type: number
121+
default: 10
122+
118123
secrets:
119124
VAULT_ADDR:
120125
required: false
@@ -139,6 +144,7 @@ jobs:
139144
setup:
140145
name: 'Environment setup'
141146
runs-on: ${{ inputs.runner }}
147+
timeout-minutes: ${{ inputs.timeout_minutes }}
142148
steps:
143149
- name: Git checkout
144150
uses: actions/checkout@v3
@@ -164,6 +170,7 @@ jobs:
164170
name: 'Build'
165171
if: ${{ contains(inputs.ci_steps, 'build') || contains(inputs.ci_steps, 'analyze') }}
166172
runs-on: ${{ inputs.runner }}
173+
timeout-minutes: ${{ inputs.timeout_minutes }}
167174
steps:
168175
- name: Git checkout
169176
uses: actions/checkout@v3
@@ -206,6 +213,7 @@ jobs:
206213
name: 'Lint the code'
207214
if: ${{ contains(inputs.ci_steps, 'lint') }}
208215
runs-on: ${{ inputs.runner }}
216+
timeout-minutes: ${{ inputs.timeout_minutes }}
209217
steps:
210218
- name: Git checkout
211219
uses: actions/checkout@v3
@@ -234,6 +242,7 @@ jobs:
234242
name: 'Run tests'
235243
if: ${{ contains(inputs.ci_steps, 'test') }}
236244
runs-on: ${{ inputs.runner }}
245+
timeout-minutes: ${{ inputs.timeout_minutes }}
237246
steps:
238247
- name: Git checkout
239248
uses: actions/checkout@v3
@@ -262,6 +271,7 @@ jobs:
262271
name: 'Run tests with coverage'
263272
if: ${{ contains(inputs.ci_steps, 'jest') }}
264273
runs-on: ${{ inputs.runner }}
274+
timeout-minutes: ${{ inputs.timeout_minutes }}
265275
steps:
266276
- name: Git checkout
267277
uses: actions/checkout@v3
@@ -293,6 +303,7 @@ jobs:
293303
name: 'Analyze the Next.js bundle size'
294304
if: ${{ contains(inputs.ci_steps, 'analyze') }}
295305
runs-on: ${{ inputs.runner }}
306+
timeout-minutes: ${{ inputs.timeout_minutes }}
296307
steps:
297308
- name: Git checkout
298309
uses: actions/checkout@v3
@@ -305,6 +316,7 @@ jobs:
305316
name: 'Deploy the application'
306317
if: ${{ contains(inputs.ci_steps, 'deploy') }}
307318
runs-on: ${{ inputs.runner }}
319+
timeout-minutes: ${{ inputs.timeout_minutes }}
308320
steps:
309321
- name: Git checkout
310322
uses: actions/checkout@v3

0 commit comments

Comments
 (0)