Use this action to create or update a Kubernetes resource file, which groups multiple resources for your application into a single YAML file.
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
Input name | Data type | Required? | Description |
---|---|---|---|
|
String |
Yes |
The path of the Kubernetes resource file to be created/updated. |
|
JSON |
No |
Kubernetes environment variables, formatted as JSON data in key/value pairs. |
|
String |
Required only if |
The path of the file that contains the environment variables. |
|
String |
No |
The namespace where the created/updated Kubernetes resource file is located. |
Usage example
In your YAML file, add:
- name: Create or update a Kubernetes resource uses: cloudbees-io/kubernetes-create-resource@v1 with: file-path: ${{ cloudbees.workspace }}/input.yml environment-variables: '{"IMAGE_NAME":"nginx:latest","CUSTOM_VALUE":"alpine:latest","port":"80"}' environment-variables-path: ${{ cloudbees.workspace }}/sample.json namespace: my-namespace