Skip to content

Repository files navigation

codecov

github-action-workflow

GitHub Actions compatible workflows

Feature

  • Convert GitHub Workflows to Argo Workflows
  • Argo CD Config Management Plugin (CMP)

Usage

You can use it as a CLI:

gaw convert .github/workflows/pull-request.yaml

you can install it via hd:

hd i gaw

As CMP

This 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: plugins

then, 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: trueEOF

Compatible

Considering GitHub Workflows has a complex syntax. Currently, we support the following ones:

  • Event filter
    • Support on.push, on.schedule and on.merge_request
  • keyword uses
    • support actions/checkout, actions/setup-go, goreleaser/goreleaser-action and docker://
  • keyword run
  • keyword env
  • concurrency
    • Not support cancel-in-progress yet

There are some limitations. For example, only the first job could be recognized in each file.

About

GitHub Actions compitable workflows

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages