03-sensor-github.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. entrypoint: whalesay
  32. arguments:
  33. parameters:
  34. - name: message
  35. # value will get overridden by the event payload
  36. value: hello world
  37. templates:
  38. - name: whalesay
  39. inputs:
  40. parameters:
  41. - name: message
  42. container:
  43. image: docker/whalesay:latest
  44. command: [cowsay]
  45. args: ["{{inputs.parameters.message}}"]
  46. parameters:
  47. - src:
  48. dependencyName: test-dep
  49. dest: spec.arguments.parameters.0.value