030-sensor-github.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. apiVersion: argoproj.io/v1alpha1
  2. kind: Sensor
  3. metadata:
  4. name: github
  5. namespace: argo-events
  6. spec:
  7. template:
  8. serviceAccountName: argo-events-sa
  9. dependencies:
  10. - name: test-dep
  11. gatewayName: github
  12. eventName: example
  13. subscription:
  14. http:
  15. port: 9300
  16. triggers:
  17. - template:
  18. name: github-workflow-trigger
  19. k8s:
  20. group: argoproj.io
  21. version: v1alpha1
  22. resource: workflows
  23. operation: create
  24. source:
  25. resource:
  26. apiVersion: argoproj.io/v1alpha1
  27. kind: Workflow
  28. metadata:
  29. generateName: github-
  30. spec:
  31. serviceAccountName: workflow
  32. entrypoint: whalesay
  33. arguments:
  34. parameters:
  35. - name: message
  36. # value will get overridden by the event payload
  37. value: hello world
  38. templates:
  39. - name: whalesay
  40. inputs:
  41. parameters:
  42. - name: message
  43. container:
  44. image: docker/whalesay:latest
  45. command: [cowsay]
  46. args: ["{{inputs.parameters.message}}"]
  47. parameters:
  48. - src:
  49. dependencyName: test-dep
  50. dest: spec.arguments.parameters.0.value