File tree 1 file changed +12
-2
lines changed
.github/actions/kubectl-wait
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,12 +21,22 @@ inputs:
21
21
runs :
22
22
using : composite
23
23
steps :
24
+ - name : Set vars
25
+ shell : bash
26
+ run : |
27
+ NAMESPACE_PARAM="${{ inputs.namespace != '' && format('-n {0}', inputs.namespace) || '' }}" >> $GITHUB_ENV
28
+
24
29
- name : Watch resources
25
30
shell : bash
26
- env :
27
- NAMESPACE_PARAM : " ${{ inputs.namespace != '' && format('-n {0}', inputs.namespace) || '' }}"
28
31
run : |
29
32
kubectl get ${{ inputs.wait-resource }} --watch $NAMESPACE_PARAM &
30
33
KWPID=$!
31
34
kubectl wait --timeout=${{ inputs.wait-timeout }} --all=true --for=condition=${{ inputs.wait-condition }} ${{ inputs.wait-resource }} $NAMESPACE_PARAM
32
35
kill $KWPID
36
+
37
+ - name : Spit resources status after wait
38
+ shell : bash
39
+ if : always()
40
+ run : |
41
+ kubectl get ${{ inputs.wait-resource }} $NAMESPACE_PARAM
42
+ kubectl describe ${{ inputs.wait-resource }} $NAMESPACE_PARAM
You can’t perform that action at this time.
0 commit comments