Skip to content

Commit

Permalink
Merge pull request #814 from ocaml/update-doc-opam-repositories
Browse files Browse the repository at this point in the history
Update doc for `opam-repositories`
  • Loading branch information
smorimoto authored Jun 20, 2024
2 parents ade2858 + df648e1 commit 1047274
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 22 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
4 changes: 1 addition & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 1047274

Please sign in to comment.