File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,23 @@ To use kubectl put this step into your workflow:
39
39
args : get pods
40
40
` ` `
41
41
42
+ ### Using kubectl ouput
43
+ ` ` ` yaml
44
+ - run : echo "EXPECTED_NAMESPACE=namespace/$NAMESPACE" >> $GITHUB_ENV
45
+ - name : 🛂 Check namespace exists
46
+ uses : actions-hub/kubectl@master
47
+ with :
48
+ redirect-to : NAMESPACE_EXIST
49
+ args : get namespace ${{ env.NAMESPACE }} -o name --ignore-not-found
50
+
51
+ - name : 🛡️ Preserve secret WEBAPP_TLS
52
+ if : env.NAMESPACE_EXIST == env.EXPECTED_NAMESPACE
53
+ uses : actions-hub/kubectl@master
54
+ with :
55
+ redirect-to : WEBAPP_TLS
56
+ args : get secret webapp-tls -n ${{ env.NAMESPACE }} -o yaml
57
+ ` ` `
58
+
42
59
## Environment variables
43
60
All these variables need to authorize to kubernetes cluster.
44
61
I recommend using secrets for this.
You can’t perform that action at this time.
0 commit comments