-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variable as Namespace #45
Comments
You need to use namespace like When you use it like |
That didn't do the trick, it seems to ignore when I do that:
This was with the following config:
|
You have to declare that environment globally. I suppose that value is not added to the env context because of where you're declaring it. Consider adding an environment section at the workflow level. Something like this: https://github.com/Azure/actions-workflow-samples/blob/master/Kubernetes/build-and-deploy-docker-image-aks-using-manifests.yml#L15 Documentation: https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables |
Maybe I'm missing something simple, but I cannot figure this out for the life of me. I'm trying to set the namespace to dev if the branch is not "master" and I have the branch detection working right now. But it looks like k8s-deploy will not take a variable as the namespace name. Maybe it's a syntax error I'm missing? Here is my yaml:
I succeed on all steps but the last, which says it cannot find a namespace named "$NAMEPSACE":
Is there a way to use a variable to determine the namespace so I can avoid one yaml for master and one for other branches?
The text was updated successfully, but these errors were encountered: