github.com/kubevela/workflow@v0.6.0/examples/workflow-run/request.yaml (about) 1 apiVersion: core.oam.dev/v1alpha1 2 kind: WorkflowRun 3 metadata: 4 name: request-http 5 namespace: default 6 spec: 7 workflowSpec: 8 steps: 9 - name: request 10 type: request 11 properties: 12 url: https://api.github.com/repos/kubevela/notfound 13 outputs: 14 - name: stars 15 valueFrom: | 16 import "strconv" 17 "Current star count: " + strconv.FormatInt(response["stargazers_count"], 10) 18 - name: notification 19 type: notification 20 inputs: 21 - from: stars 22 parameterKey: slack.message.text 23 properties: 24 slack: 25 url: 26 value: <your slack url> 27 - name: failed-notification 28 type: notification 29 if: status.request.failed 30 properties: 31 slack: 32 url: 33 value: <your slack url> 34 message: 35 text: "Failed to request github" 36