GitHub Actions compatible workflows
- Convert GitHub Workflows to Argo Workflows
- Argo CD Config Management Plugin (CMP)
You can use it as a CLI:
gaw convert .github/workflows/pull-request.yamlyou can install it via hd:
hd i gawThis repository could be Config Management Plugin as well.
First, please patch argocd-repo-server with the following snippet:
apiVersion: apps/v1kind: Deploymentmetadata:
name: argocd-repo-servernamespace: argocdspec:
template:
spec:
containers:
- args:
- --loglevel
- debugcommand:
- /var/run/argocd/argocd-cmp-serverimage: ghcr.io/linuxsuren/github-action-workflow:masterimagePullPolicy: IfNotPresentname: toolresources: {}securityContext:
runAsNonRoot: truerunAsUser: 999volumeMounts:
- mountPath: /var/run/argocdname: var-files
- mountPath: /home/argocd/cmp-server/pluginsname: pluginsthen, create an Application on the Argo CD UI or CLI:
cat <<EOF | kubectl apply -f -apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata: name: yaml-readme namespace: argocdspec: destination: namespace: default server: https://kubernetes.default.svc project: default source: path: .github/workflows/ # It will generate multiple Argo CD application manifests # base on YAML files from this directory. # Please make sure the path ends with slash. plugin: {} # Argo CD will choose the corresponding CMP automatically repoURL: https://gitee.com/linuxsuren/yaml-readme # a sample project for discovering manifests targetRevision: HEAD syncPolicy: automated: selfHeal: trueEOFConsidering GitHub Workflows has a complex syntax. Currently, we support the following ones:
- Event filter
- Support
on.push,on.scheduleandon.merge_request
- Support
- keyword
uses- support
actions/checkout,actions/setup-go,goreleaser/goreleaser-actionanddocker://
- support
- keyword
run - keyword
env - concurrency
- Not support
cancel-in-progressyet
- Not support
There are some limitations. For example, only the first job could be recognized in each file.