Skip to content

Commit

Permalink
Update doc for opam-repositories
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <sora@morimoto.io>
  • Loading branch information
smorimoto committed Jun 20, 2024
1 parent ade2858 commit c3b7f6f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ steps:

## Inputs

| Name | Required | Description | Type | Default |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | -------- |
| `ocaml-compiler` | Yes | The OCaml compiler packages to initialise. Consult the [supported version syntax](#supported-version-syntax) section. | string | |
| `opam-repositories` | No | The name and URL pair of the repository to fetch the packages from. | string | |
| `opam-pin` | No | Enable the automation feature for opam pin. | bool | `true` |
| `opam-local-packages` | No | The local packages to be used by `opam-pin`. Consult the [`@actions/glob` documentation](https://github.com/actions/toolkit/tree/main/packages/glob) package for supported patterns. | string | `*.opam` |
| `opam-disable-sandboxing` | No | Disable the opam sandboxing feature. | bool | `false` |
| `dune-cache` | No | Enable the dune cache feature. This feature **_requires_** dune 2.8.5 or later on the Windows runners. | bool | `false` |
| `cache-prefix` | No | The prefix of the cache keys. | string | `v1` |
| `allow-prerelease-opam` | No | Allow to use a pre-release version of opam. | bool | `false` |
| Name | Required | Description | Type | Default |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------- |
| `ocaml-compiler` | Yes | The OCaml compiler packages to initialise. Consult the [supported version syntax](#supported-version-syntax) section. | string | |
| `opam-repositories` | No | The name and URL pair of the repository to fetch the packages from. | string | `default: https://github.com/ocaml/opam-repository.git` |
| `opam-pin` | No | Enable the automation feature for opam pin. | bool | `true` |
| `opam-local-packages` | No | The local packages to be used by `opam-pin`. Consult the [`@actions/glob` documentation](https://github.com/actions/toolkit/tree/main/packages/glob) package for supported patterns. | string | `*.opam` |
| `opam-disable-sandboxing` | No | Disable the opam sandboxing feature. | bool | `false` |
| `dune-cache` | No | Enable the dune cache feature. This feature **_requires_** dune 2.8.5 or later on the Windows runners. | bool | `false` |
| `cache-prefix` | No | The prefix of the cache keys. | string | `v1` |
| `allow-prerelease-opam` | No | Allow to use a pre-release version of opam. | bool | `false` |

### Supported version syntax

Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ inputs:
opam-repositories:
description: The name and URL pair of the repository to fetch the packages from.
required: false
default: ""
default: |
default: git+https://github.com/ocaml/opam-repository.git
opam-pin:
description: Enable the automation feature for opam pin.
required: false
Expand Down
7 changes: 2 additions & 5 deletions packages/setup-ocaml/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ export const OPAM_REPOSITORIES: [string, string][] = (() => {
required: false,
trimWhitespace: true,
}),
) as Record<string, string> | null;

return repositories_yaml
? Object.entries(repositories_yaml).reverse()
: [["default", "https://github.com/ocaml/opam-repository.git"]];
) as Record<string, string>;
return Object.entries(repositories_yaml).reverse();
})();

0 comments on commit c3b7f6f

Please sign in to comment.