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/v1 kind: Deployment metadata: name: argocd-repo-server namespace: argocd spec: template: spec: containers: - args: - --loglevel - debug command: - /var/run/argocd/argocd-cmp-server image: ghcr.io/linuxsuren/github-action-workflow:master imagePullPolicy: IfNotPresent name: tool resources: {} securityContext: runAsNonRoot: true runAsUser: 999 volumeMounts: - mountPath: /var/run/argocd name: var-files - mountPath: /home/argocd/cmp-server/plugins name: pluginsthen, create an Application on the Argo CD UI or CLI:
kind: Application metadata: name: yaml-readme namespace: argocd spec: 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: trueConsidering GitHub Workflows has a complex syntax. Currently, we support the following ones:
- Event filter
- Support
on.pushandon.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.