Skip to content

Commit 76a4ba6

Browse files
authored
Merge pull request #36 from Cirrus-8691/master
Using kubectl ouput
2 parents 331d200 + 7b7db0e commit 76a4ba6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ To use kubectl put this step into your workflow:
3939
args: get pods
4040
```
4141
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+
4259
## Environment variables
4360
All these variables need to authorize to kubernetes cluster.
4461
I recommend using secrets for this.

0 commit comments

Comments
 (0)