generated from argoproj-labs/argo-workflows-hello-executor-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
plugin.yaml
79 lines (70 loc) · 2.26 KB
/
plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This file generates the README. Run `make manifests` after editing this file.
kind: ExecutorPlugin
apiVersion: argoproj.io/v1alpha1
metadata:
name: github
annotations:
workflows.argoproj.io/description: |
[![codecov](https://codecov.io/gh/crenshaw-dev/github-executor-plugin/branch/main/graph/badge.svg?token=MD2ZVGZ5G9)](https://codecov.io/gh/crenshaw-dev/github-executor-plugin)
This is an Argo Workflows executor plugin for interacting with GitHub.
## Example
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: github-example-
spec:
entrypoint: main
templates:
- name: main
plugin:
github:
# Use `issue` to create comments for PRs - the GitHub API considers PRs to be issues.
issue:
comment:
body: "Hello, world!"
number: "1" # PR number, from the
owner: crenshaw-dev
repo: github-executor-plugin
```
## Prerequisites
### Set up a GitHub personal access token
See [GitHub's instructions](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
to set up your token.
Then create a secret using that token.
```bash
# First, copy your token to the clipboard.
pbpaste > token
kubectl create secret generic github-token --from-file=token -n argo
rm token
```
## How to install
workflows.argoproj.io/version: '>= v3.3'
spec:
sidecar:
container:
image: crenshawdotdev/github-executor-plugin:latest
env:
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
name: github-token
key: token
name: github
ports:
- containerPort: 4356
resources:
requests:
cpu: 100m
memory: 32Mi
limits:
cpu: 200m
memory: 64Mi
securityContext:
runAsNonRoot: true
runAsUser: 1000
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL