{"id":15652210,"url":"https://github.com/linuxsuren/github-action-workflow","last_synced_at":"2025-03-09T13:31:03.677Z","repository":{"id":65277522,"uuid":"576915670","full_name":"LinuxSuRen/github-action-workflow","owner":"LinuxSuRen","description":"GitHub Actions compitable workflows","archived":false,"fork":false,"pushed_at":"2023-06-20T04:34:09.000Z","size":79,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T10:51:38.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinuxSuRen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-11T12:08:18.000Z","updated_at":"2024-01-12T18:52:59.000Z","dependencies_parsed_at":"2024-06-21T17:43:03.061Z","dependency_job_id":"76bf8cba-a8b7-4c51-a82b-70fa14b41c80","html_url":"https://github.com/LinuxSuRen/github-action-workflow","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxSuRen%2Fgithub-action-workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxSuRen%2Fgithub-action-workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxSuRen%2Fgithub-action-workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinuxSuRen%2Fgithub-action-workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinuxSuRen","download_url":"https://codeload.github.com/LinuxSuRen/github-action-workflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242695459,"owners_count":20170766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T12:41:43.874Z","updated_at":"2025-03-09T13:31:03.245Z","avatar_url":"https://github.com/LinuxSuRen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/LinuxSuRen/github-action-workflow/branch/master/graph/badge.svg?token=mnFyeD2IQ7)](https://codecov.io/gh/LinuxSuRen/github-action-workflow)\n\n# github-action-workflow\nGitHub Actions compatible workflows\n\n## Feature\n* Convert GitHub Workflows to Argo Workflows\n* Argo CD Config Management Plugin (CMP)\n\n## Usage\nYou can use it as a CLI:\n\n```shell\ngaw convert .github/workflows/pull-request.yaml\n```\n\nyou can install it via [hd](https://github.com/LinuxSuRen/http-downloader):\n\n```shell\nhd i gaw\n```\n\n## As CMP\nThis repository could be [Config Management Plugin](https://argo-cd.readthedocs.io/en/stable/user-guide/config-management-plugins/#option-2-configure-plugin-via-sidecar) as well.\n\nFirst, please patch `argocd-repo-server` with the following snippet:\n\n```yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: argocd-repo-server\n  namespace: argocd\nspec:\n  template:\n    spec:\n      containers:\n      - args:\n        - --loglevel\n        - debug\n        command:\n        - /var/run/argocd/argocd-cmp-server\n        image: ghcr.io/linuxsuren/github-action-workflow:master\n        imagePullPolicy: IfNotPresent\n        name: tool\n        resources: {}\n        securityContext:\n          runAsNonRoot: true\n          runAsUser: 999\n        volumeMounts:\n        - mountPath: /var/run/argocd\n          name: var-files\n        - mountPath: /home/argocd/cmp-server/plugins\n          name: plugins\n```\n\nthen, create an Application on the Argo CD UI or CLI:\n\n```shell\ncat \u003c\u003cEOF | kubectl apply -f -\napiVersion: argoproj.io/v1alpha1\nkind: Application\nmetadata:\n  name: yaml-readme\n  namespace: argocd\nspec:\n  destination:\n    namespace: default\n    server: https://kubernetes.default.svc\n  project: default\n  source:\n    path: .github/workflows/                            # It will generate multiple Argo CD application manifests \n                                                        # base on YAML files from this directory.\n                                                        # Please make sure the path ends with slash.\n    plugin: {}                                          # Argo CD will choose the corresponding CMP automatically\n    repoURL: https://gitee.com/linuxsuren/yaml-readme   # a sample project for discovering manifests\n    targetRevision: HEAD\n  syncPolicy:\n    automated:\n      selfHeal: true\nEOF\n```\n\n## Compatible\nConsidering [GitHub Workflows](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses) \nhas a complex syntax. Currently, we support the following ones:\n\n* [Event filter](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on)\n  * Support `on.push`, `on.schedule` and `on.merge_request`\n* keyword `uses`\n  * support `actions/checkout`, `actions/setup-go`, `goreleaser/goreleaser-action` and `docker://`\n* keyword `run`\n* keyword `env`\n* [concurrency](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)\n  * Not support `cancel-in-progress` yet\n\nThere are some limitations. For example, only the first job could be recognized in each file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxsuren%2Fgithub-action-workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxsuren%2Fgithub-action-workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxsuren%2Fgithub-action-workflow/lists"}