{"id":20852561,"url":"https://github.com/vpayno/github-gitlab-with-cuelang","last_synced_at":"2026-03-19T17:51:12.755Z","repository":{"id":226127954,"uuid":"767832565","full_name":"vpayno/github-gitlab-with-cuelang","owner":"vpayno","description":"Experiments in using Cuelang with GitHub Workflows/Actions and GitLab Pipelines.","archived":false,"fork":false,"pushed_at":"2024-03-08T02:45:01.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-12T20:54:03.268Z","etag":null,"topics":["cuelang","github-workflows","runme-playbooks"],"latest_commit_sha":null,"homepage":"","language":"CUE","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/vpayno.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":"2024-03-06T01:10:47.000Z","updated_at":"2024-04-23T13:10:34.000Z","dependencies_parsed_at":"2024-06-20T23:29:43.799Z","dependency_job_id":null,"html_url":"https://github.com/vpayno/github-gitlab-with-cuelang","commit_stats":null,"previous_names":["vpayno/github-gitlab-with-cuelang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vpayno/github-gitlab-with-cuelang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpayno%2Fgithub-gitlab-with-cuelang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpayno%2Fgithub-gitlab-with-cuelang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpayno%2Fgithub-gitlab-with-cuelang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpayno%2Fgithub-gitlab-with-cuelang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vpayno","download_url":"https://codeload.github.com/vpayno/github-gitlab-with-cuelang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpayno%2Fgithub-gitlab-with-cuelang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30306555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T17:35:44.120Z","status":"ssl_error","status_checked_at":"2026-03-09T17:35:43.707Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cuelang","github-workflows","runme-playbooks"],"created_at":"2024-11-18T03:18:03.593Z","updated_at":"2026-03-09T18:18:04.565Z","avatar_url":"https://github.com/vpayno.png","language":"CUE","funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-gitlab-with-cuelang\n\n[![Go Workflow](https://github.com/vpayno/github-gitlab-with-cuelang/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/vpayno/github-gitlab-with-cuelang/actions/workflows/go.yml)\n\nExperiments in using Cuelang with GitHub Workflows/Actions and GitLab Pipelines.\n\n## Notes\n\n- This is a runnable [Runme](https://github.com/stateful/runme) playbook.\n\n## Dependencies\n\n- [Cue CLI](https://github.com/cue-lang/cue)\n\n```bash { background=false category=dependencies closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=install-dependency-cue promptEnv=true terminalRows=10 }\ngo install cuelang.org/go/cmd/cue@latest\n```\n\n## JSON Schemas to Cue\n\nSchema sources:\n\n- [GitHub Workflow](https://json.schemastore.org/github-workflow.json)\n\n```bash { background=false category=schema-import closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=schema-import-github promptEnv=true terminalRows=10 }\nset -ex\n\nmkdir -pv ./cue.mod/pkg/json.schemastore.org/github\n\ncd ./cue.mod/pkg/json.schemastore.org/github\n\nrm -fv ./github-workflow.json\n\nwget -c https://json.schemastore.org/github-workflow.json\n\ncue import --verbose --force --path '#Workflow:' --package github jsonschema: ./github-workflow.json\n\nls\n```\n\n- [GitLab CI](https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json)\n\n```bash { background=false category=schema-import closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=schema-import-gitlab promptEnv=true terminalRows=10 }\nset -ex\n\nmkdir -pv ./cue.mod/pkg/json.schemastore.org/gitlab\n\ncd ./cue.mod/pkg/json.schemastore.org/gitlab\n\nrm -fv ./gitlab-ci.json\n\nwget -c https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json -O ./gitlab-ci.json\n\ncue import --verbose --force --path '#GitLabCi:' --package gitlab jsonschema: ./gitlab-ci.json\n\nls\n```\n\n## Importing Workflows to Cue\n\nThis should only be run once. It's here as documentation and it was used for the original import.\n\n```bash { background=false category=github-import closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=workflow-import-github promptEnv=true terminalRows=20 }\nset -ex\n\nif [[ -f .runme-lock-github-workflow-import ]]; then\n    gum confirm \"GitHub Workflows were already imported. Re-Import?\" || exit\nfi\n\ncd .github/workflows/\n\nls\n\ncue import -f -p workflows -l 'strings.Replace(name, \" \", \"\", -1)' ./*.yml\n\nls\n\ntouch \"$(git rev-parse --show-toplevel)/.runme-lock-github-workflow-import\"\n```\n\n## Running `cue vet`\n\nTo validate the cue files:\n\n```bash { background=false category=github-validate closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=workflow-vet-github promptEnv=true terminalRows=10 }\nset -ex\n\ncd .github/workflows/\n\nls\n\ncue vet || { printf \"\\n\"; cue vet -c; }\n```\n\n## Running `cue export`\n\nTo test the cue files:\n\n```bash { background=false category=github-validate closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=workflow-test-github promptEnv=true terminalRows=10 }\nset -ex\n\ncd .github/workflows/\n\nls\n\ncue export | less\n```\n\n## Running `cue trim`\n\nTo trim the exported data:\n\n```bash { background=false category=github-trim closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=workflow-trim-github promptEnv=true terminalRows=10 }\nset -ex\n\ncd .github/workflows/\n\nls\n\ncue trim\n\nls\n\ngit diff .\n```\n\n## Generating Workflows from Cue Data\n\nTo export the workflows run the following command:\n\n```bash { background=false category=github-export closeTerminalOnSuccess=false excludeFromRunAll=true interactive=true interpreter=bash name=workflow-export-github promptEnv=true terminalRows=10 }\nset -ex\n\ncd .github/workflows/\n\nls\n\ncue cmd genworkflows\n\nls\n\ngit diff .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpayno%2Fgithub-gitlab-with-cuelang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvpayno%2Fgithub-gitlab-with-cuelang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpayno%2Fgithub-gitlab-with-cuelang/lists"}