{"id":13687390,"url":"https://github.com/ocharles/micro-ci","last_synced_at":"2025-10-26T00:30:57.604Z","repository":{"id":66319073,"uuid":"106111643","full_name":"ocharles/micro-ci","owner":"ocharles","description":"A tiny CI server built around GitHub and Nix","archived":false,"fork":false,"pushed_at":"2017-10-09T15:46:03.000Z","size":81,"stargazers_count":133,"open_issues_count":3,"forks_count":14,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-31T12:51:22.522Z","etag":null,"topics":["continuous-integration","dhall","haskell","nix","nixos","nixpkgs"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/ocharles.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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}},"created_at":"2017-10-07T16:12:27.000Z","updated_at":"2024-11-12T10:29:37.000Z","dependencies_parsed_at":"2023-02-24T17:00:28.311Z","dependency_job_id":null,"html_url":"https://github.com/ocharles/micro-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/ocharles%2Fmicro-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocharles%2Fmicro-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocharles%2Fmicro-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocharles%2Fmicro-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocharles","download_url":"https://codeload.github.com/ocharles/micro-ci/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238229940,"owners_count":19437723,"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":["continuous-integration","dhall","haskell","nix","nixos","nixpkgs"],"created_at":"2024-08-02T15:00:53.957Z","updated_at":"2025-10-26T00:30:52.302Z","avatar_url":"https://github.com/ocharles.png","language":"Haskell","funding_links":[],"categories":["Haskell"],"sub_categories":[],"readme":"# micro-ci\n\nHello, thanks for checking out `micro-ci`.\n\n`micro-ci` is a tiny continuous integration server, that tries to do\nvery little. By this, we mean off loading as much logic as possible to\nother systems. In particular, this continuous integration server\n*only* supports GitHub and Nix.\n\nThis project is in its infancy, but if you'd like to play along at\nhome, here's how.\n\n![Example](./example.png)\n\n## Getting Started\n\n1. **Get an OAuth token.**\n\n   Navigate to https://github.com/settings/tokens and generate a new\n   OAuth token. It only needs the `repo:status` permission.\n\n2. **Add the webhook.**\n\n   Go to https://github.com/$YOUR_NAME/$YOUR_REPO/settings/hooks,\n   changing `$YOUR_NAME` and `$YOUR_REPO` appropriately. Add a webhook\n   with a URL of the format: `http://$PUBLIC_HOST:8080/github/web-hook`,\n   where `$PUBLIC_HOST` is the publically accessible host of the\n   server that will be running your builds.\n   \n   Set:\n   \n   * Content type: `application/json`\n   * Secret: (anything you want)\n   * Which events: at least \"pull request\", but you can also just use\n     \"everything\".\n\n4. **Configure the server**.\n\n\tIn the directory you plan to run `micro-ci` from, you'll need a\n    `config.dhall` file. A template is:\n\t\n\t```dhall\n\t{\n      repoRoot = \"repositories\",\n      secret = ...,\n      oauth = ...\n\t}\n\t```\n\t\n\tFill in `oauth` and `secret` according to values previously retrieved/entered.\n\t \n4. **Run the server**.\n\n\tOn the machine that will run the builds, run\n\t\n\t```\n\tnix-build ci.nix -A micro-ci\n\t./result/bin/micro-ci\n\t```\n\n5. **Add a `ci.nix` file to your project**.\n\n\tFinally, write a `ci.nix` file in your project. This Nix\n    expression should evaluate to an attribute-set of derivations.\n\t\n\tFor example, a Haskell project could use:\n\t\n\t```nix\n\twith (import \u003cnixpkgs\u003e {});\n\t{\n\t  cabal-build = haskellPackages.callPackage ./default.nix {};\n\t}\n\t```\n\t\n\tBut you can be as clever as you want. All that `micro-ci` cares\n    about is if the derivation can be evaluated.\n\n6. *Optional*: **Add status checks**\n\n\tOpen a pull request to check that everything works. If it looks\n    good, you can enforce `micro-ci` to pass all jobs. Head to\n    https://github.com/$YOUR_NAME/$YOUR_REPO/settings/branches and set\n    up a protected branch and add the `ci.nix` statuses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focharles%2Fmicro-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focharles%2Fmicro-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focharles%2Fmicro-ci/lists"}