File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -360,20 +360,15 @@ jobs:
360360 ${{ github.workspace }}/logs/
361361 if : ${{ always() && steps.config_ach.outcome == 'success' }}
362362
363- - name : Break for manual interaction
363+ - name : Break on failure
364364 run : |
365- function wait() {
366- duration=${{ inputs.break_duration }}m
367- echo "Breaking on failure for $duration"
368- sleep $duration
369- }
370-
371- if [[ ${{ inputs.break_on }} =~ '(failure|always)' ]] && [[ ${{ failure() }} = 'true' ]]; then
372- wait "failure"
373- elif [[ ${{ inputs.break_on }} =~ '(success|always)' ]] && [[ ${{ failure() }} = 'false' ]]; then
374- wait "success"
375- fi
376- if : ${{ always() && steps.config_ach.outcome == 'success' }}
365+ sleep ${{ env.break_duration }}m
366+ if : ${{ failure() && steps.config_ach.outcome == 'success' && contains(fromJSON('["failure", "always"]'), env.break_on) }}
367+
368+ - name : Break on success
369+ run : |
370+ sleep ${{ env.break_duration }}m
371+ if : ${{ steps.config_ach.outcome == 'success' && contains(fromJSON('["success", "always"]'), env.break_on) }}
377372
378373 - name : Destroy
379374 run : terraform destroy -auto-approve -input=false
You can’t perform that action at this time.
0 commit comments