{"id":13739589,"url":"https://github.com/bgamari/dhall-gitlab-ci","last_synced_at":"2025-03-21T13:18:54.404Z","repository":{"id":39794310,"uuid":"277170647","full_name":"bgamari/dhall-gitlab-ci","owner":"bgamari","description":"A Dhall encoding of the GitLab CI configuration schema","archived":false,"fork":false,"pushed_at":"2023-11-13T23:02:12.000Z","size":48,"stargazers_count":47,"open_issues_count":10,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-20T05:35:54.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dhall","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bgamari.png","metadata":{"files":{"readme":"README.mkd","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":"2020-07-04T19:10:33.000Z","updated_at":"2024-12-05T11:02:10.000Z","dependencies_parsed_at":"2024-11-27T19:30:49.767Z","dependency_job_id":null,"html_url":"https://github.com/bgamari/dhall-gitlab-ci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgamari%2Fdhall-gitlab-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgamari%2Fdhall-gitlab-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgamari%2Fdhall-gitlab-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bgamari%2Fdhall-gitlab-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bgamari","download_url":"https://codeload.github.com/bgamari/dhall-gitlab-ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244803362,"owners_count":20512897,"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-08-03T04:00:35.541Z","updated_at":"2025-03-21T13:18:54.376Z","avatar_url":"https://github.com/bgamari.png","language":"Dhall","funding_links":[],"categories":["Dhall","Libraries"],"sub_categories":[],"readme":"# `dhall-gitlab-ci`: A Dhall representation of `gitlab-ci.yml`\n\nThis is a Dhall encoding of the GitLab CI configuration\n[schema](https://docs.gitlab.com/ee/ci/yaml/README.html).\n\nSee code under the [examples](./examples) folder or checkout the [dhall-gitlab-pipeline](https://gitlab.com/mx00s/dhall-gitlab-pipeline/-/tree/master) for a more complete project example.\n\n\n## [Single Job Example - Source](./examples/single-job.dhall)\n\n```dhall\nlet GitLab =\n      https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/package.dhall\n\nlet Prelude = GitLab.Prelude\n\nlet renderTop = GitLab.Top.toJSON\n\nlet demoJob =\n      GitLab.Job::{\n      , stage = Some \"build\"\n      , image = Some { name = \"alpine:latest\", entrypoint = Some [ \" \" ] }\n      , script = [ \"echo 'Hello World'\" ]\n      }\n\nlet top = GitLab.Top::{ jobs = toMap { generated-job = demoJob } }\n\nin  Prelude.JSON.renderYAML (renderTop top)\n```\n\n## [Multiple Jobs Example - Source](./examples/multiple-jobs.dhall)\n\n```dhall\nlet GitLab = ../package.dhall\n\nlet Prelude = GitLab.Prelude\n\nlet List/map = Prelude.List.map\n\nlet Map = Prelude.Map.Type\n\nlet Job = GitLab.Job.Type\n\nlet renderTop = GitLab.Top.toJSON\n\nlet buildDir = \"build\"\n\nlet targets = [ \"package-1\", \"package-2\" ]\n\nlet mkJob =\n      λ(target : Text) →\n        GitLab.Job::{\n        , stage = Some \"build\"\n        , image = Some { name = \"alpine:latest\", entrypoint = Some [ \" \" ] }\n        , script = [ \"echo 'Building ${buildDir}/${target} World'\" ]\n        }\n\nlet jobList\n    : List { mapKey : Text, mapValue : Job }\n    = List/map\n        Text\n        { mapKey : Text, mapValue : Job }\n        (λ(target : Text) → { mapKey = target, mapValue = mkJob target })\n        targets\n\nlet jobMap\n    : Map Text Job\n    = jobList\n\nlet top = GitLab.Top::{ jobs = jobMap }\n\nin  Prelude.JSON.renderYAML (renderTop top)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgamari%2Fdhall-gitlab-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbgamari%2Fdhall-gitlab-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbgamari%2Fdhall-gitlab-ci/lists"}