Merge pull request #36 from Cirrus-8691/master

Using kubectl ouput
This commit is contained in:
Serhiy Mytrovtsiy 2024-09-23 11:38:48 +02:00 committed by GitHub
commit 76a4ba622e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,23 @@ To use kubectl put this step into your workflow:
args: get pods 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 ## Environment variables
All these variables need to authorize to kubernetes cluster. All these variables need to authorize to kubernetes cluster.
I recommend using secrets for this. I recommend using secrets for this.