Skip to content

Commit

Permalink
doc: update
Browse files Browse the repository at this point in the history
  • Loading branch information
pnmadelaine committed Sep 24, 2023
1 parent 9224fa7 commit adea1ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
13 changes: 7 additions & 6 deletions doc/src/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ expose a `typhonProject` attribute defining the project settings.

`typhonProject` contains two attributes: `meta` and `actions`. `meta` is an
attribute set which defines metadata about your project: a title, a description
and a homepage. `actions` is a derivation that builds actions for your project.
Actions are another core concept of Typhon and are introduced below.
and a homepage. `actions` is an attribute set of derivations that build actions
for your project. Actions are another core concept of Typhon and are introduced
below.

## Actions

Expand All @@ -27,10 +28,10 @@ are three actions a project can define.
your project. They are typically used to set statuses on your repository, but
can also be used for deployment.

The `actions` attribute of `typhonProject` can also expose a `secrets` file.
This is an age encrypted JSON file that typically contains tokens for the
actions. It must be encrypted with the project's public key and is decrypted at
runtime and passed as input to the actions.
Actions can also expose a `secrets` file. This is an age encrypted JSON file
that typically contains tokens for the actions. It must be encrypted with the
project's public key and is decrypted at runtime and passed as input to the
actions.

## Jobsets

Expand Down
10 changes: 4 additions & 6 deletions doc/src/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ use the `mkGithubProject` helper function:
inputs = { typhon.url = "github:typhon-ci/typhon"; };
outputs = { self, typhon }:
let libTyphon = typhon.actions."x86_64-linux";
in {
typhonProject = libTyphon.mkGithubProject {
{
typhonProject = typhon.lib.github.mkGithubProject {
owner = "user";
repo = "project";
secrets = ./secrets.age;
Expand All @@ -51,8 +50,7 @@ created on Typhon. It contains a JSON object with your GitHub token:
Encrypt the JSON file with `age`:

```shell
nix shell nixpkgs#age
age --encrypt -r $public_key -o secrets.age secrets.json
nix run nixpkgs#age -- --encrypt -r $public_key -o secrets.age secrets.json
```

Finally, you need to commit the lock file of your flake.
Expand All @@ -71,7 +69,7 @@ For instance, you can declare GNU hello as your only job:
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
typhonJobs = {
typhonJobs.${system} = {
inherit (pkgs) hello;
};
};
Expand Down

0 comments on commit adea1ab

Please sign in to comment.