commit
76a4ba622e
17
README.md
17
README.md
@ -39,6 +39,23 @@ To use kubectl put this step into your workflow:
|
||||
args: get pods
|
||||
```
|
||||
|
||||
### Using kubectl ouput
|
||||
```yaml
|
||||
- run: echo "EXPECTED_NAMESPACE=namespace/$NAMESPACE" >> $GITHUB_ENV
|
||||
- name: 🛂 Check namespace exists
|
||||
uses: actions-hub/kubectl@master
|
||||
with:
|
||||
redirect-to: NAMESPACE_EXIST
|
||||
args: get namespace ${{ env.NAMESPACE }} -o name --ignore-not-found
|
||||
|
||||
- name: 🛡️ Preserve secret WEBAPP_TLS
|
||||
if: env.NAMESPACE_EXIST == env.EXPECTED_NAMESPACE
|
||||
uses: actions-hub/kubectl@master
|
||||
with:
|
||||
redirect-to: WEBAPP_TLS
|
||||
args: get secret webapp-tls -n ${{ env.NAMESPACE }} -o yaml
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
All these variables need to authorize to kubernetes cluster.
|
||||
I recommend using secrets for this.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user