This commit is contained in:
@@ -172,7 +172,11 @@ func init() {
|
|||||||
"x-direktiv-examples": [
|
"x-direktiv-examples": [
|
||||||
{
|
{
|
||||||
"content": "- id: export-xlsx\n type: action\n action:\n function: export-xlsx\n input: \n files:\n - name: /tmp/input.json\n data: |\n jq(.input) \n worksheet-name: \"TestSpreadsheet\"\n out-filename: example.xlsx",
|
"content": "- id: export-xlsx\n type: action\n action:\n function: export-xlsx\n input: \n files:\n - name: /tmp/input.json\n data: |\n jq(.input) \n worksheet-name: \"TestSpreadsheet\"\n out-filename: example.xlsx",
|
||||||
"title": "Basic"
|
"title": "Rely on Direktiv to create input file"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"content": "- id: export-xlsx\n type: action\n action:\n function: export-xlsx\n input: \n worksheet-name: \"TestSpreadsheet\"\n out-filename: example.xlsx\n in-data: jq(.array | tostring) ",
|
||||||
|
"title": "Use function to create input file"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"x-direktiv-function": "functions:\n- id: export-xlsx\n image: registry.coadcorp.com/export-xlsx:1.0\n type: knative-workflow",
|
"x-direktiv-function": "functions:\n- id: export-xlsx\n image: registry.coadcorp.com/export-xlsx:1.0\n type: knative-workflow",
|
||||||
@@ -355,7 +359,11 @@ func init() {
|
|||||||
"x-direktiv-examples": [
|
"x-direktiv-examples": [
|
||||||
{
|
{
|
||||||
"content": "- id: export-xlsx\n type: action\n action:\n function: export-xlsx\n input: \n files:\n - name: /tmp/input.json\n data: |\n jq(.input) \n worksheet-name: \"TestSpreadsheet\"\n out-filename: example.xlsx",
|
"content": "- id: export-xlsx\n type: action\n action:\n function: export-xlsx\n input: \n files:\n - name: /tmp/input.json\n data: |\n jq(.input) \n worksheet-name: \"TestSpreadsheet\"\n out-filename: example.xlsx",
|
||||||
"title": "Basic"
|
"title": "Rely on Direktiv to create input file"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"content": "- id: export-xlsx\n type: action\n action:\n function: export-xlsx\n input: \n worksheet-name: \"TestSpreadsheet\"\n out-filename: example.xlsx\n in-data: jq(.array | tostring) ",
|
||||||
|
"title": "Use function to create input file"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"x-direktiv-function": "functions:\n- id: export-xlsx\n image: registry.coadcorp.com/export-xlsx:1.0\n type: knative-workflow",
|
"x-direktiv-function": "functions:\n- id: export-xlsx\n image: registry.coadcorp.com/export-xlsx:1.0\n type: knative-workflow",
|
||||||
|
13
readme.md
13
readme.md
@@ -24,7 +24,7 @@ functions:
|
|||||||
image: registry.coadcorp.com/export-xlsx:1.0
|
image: registry.coadcorp.com/export-xlsx:1.0
|
||||||
type: knative-workflow
|
type: knative-workflow
|
||||||
```
|
```
|
||||||
#### Basic
|
#### Rely on Direktiv to create input file
|
||||||
```yaml
|
```yaml
|
||||||
- id: export-xlsx
|
- id: export-xlsx
|
||||||
type: action
|
type: action
|
||||||
@@ -38,6 +38,17 @@ functions:
|
|||||||
worksheet-name: "TestSpreadsheet"
|
worksheet-name: "TestSpreadsheet"
|
||||||
out-filename: example.xlsx
|
out-filename: example.xlsx
|
||||||
```
|
```
|
||||||
|
#### Use function to create input file
|
||||||
|
```yaml
|
||||||
|
- id: export-xlsx
|
||||||
|
type: action
|
||||||
|
action:
|
||||||
|
function: export-xlsx
|
||||||
|
input:
|
||||||
|
worksheet-name: "TestSpreadsheet"
|
||||||
|
out-filename: example.xlsx
|
||||||
|
in-data: jq(.array | tostring)
|
||||||
|
```
|
||||||
|
|
||||||
### Secrets
|
### Secrets
|
||||||
|
|
||||||
|
@@ -14,3 +14,12 @@ states:
|
|||||||
name: /tmp/input.json
|
name: /tmp/input.json
|
||||||
out-filename: example.xlsx
|
out-filename: example.xlsx
|
||||||
worksheet-name: TestSpreadsheet
|
worksheet-name: TestSpreadsheet
|
||||||
|
transition: state1
|
||||||
|
- id: state1
|
||||||
|
type: action
|
||||||
|
action:
|
||||||
|
function: export-xlsx
|
||||||
|
input:
|
||||||
|
in-data: jq(.array | tostring)
|
||||||
|
out-filename: example.xlsx
|
||||||
|
worksheet-name: TestSpreadsheet
|
||||||
|
Reference in New Issue
Block a user