mirror of
https://github.com/DeterminateSystems/determinate-nix-action.git
synced 2026-02-24 22:57:12 +00:00
Fix rendering of Booleans
This commit is contained in:
parent
44b49325b1
commit
7bdbe146aa
2 changed files with 13 additions and 7 deletions
10
README.md
10
README.md
|
|
@ -96,13 +96,13 @@ updates:
|
||||||
| `extra-conf` | Extra configuration lines for `/etc/nix/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set) | | |
|
| `extra-conf` | Extra configuration lines for `/etc/nix/nix.conf` (includes `access-tokens` with `secrets.GITHUB_TOKEN` automatically if `github-token` is set) | | |
|
||||||
| `github-server-url` | The URL for the GitHub server, to use with the `github-token` token. Defaults to the current GitHub server, supporting GitHub Enterprise Server automatically. Only change this value if the provided `github-token` is for a different GitHub server than the current server. | | `${{ github.server_url }}` |
|
| `github-server-url` | The URL for the GitHub server, to use with the `github-token` token. Defaults to the current GitHub server, supporting GitHub Enterprise Server automatically. Only change this value if the provided `github-token` is for a different GitHub server than the current server. | | `${{ github.server_url }}` |
|
||||||
| `github-token` | A GitHub token for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests) | | `${{ github.token }}` |
|
| `github-token` | A GitHub token for making authenticated requests (which have a higher rate-limit quota than unauthenticated requests) | | `${{ github.token }}` |
|
||||||
| `trust-runner-user` | Whether to make the runner user trusted by the Nix daemon | | `True` |
|
| `trust-runner-user` | Whether to make the runner user trusted by the Nix daemon | | `true` |
|
||||||
| `force-no-systemd` | Force using other methods than systemd to launch the daemon. This setting is automatically enabled when necessary. | | `False` |
|
| `force-no-systemd` | Force using other methods than systemd to launch the daemon. This setting is automatically enabled when necessary. | | `false` |
|
||||||
| `init` | The init system to configure, requires `planner: linux-multi` (allowing the choice between `none` or `systemd`) | | |
|
| `init` | The init system to configure, requires `planner: linux-multi` (allowing the choice between `none` or `systemd`) | | |
|
||||||
| `kvm` | Automatically configure the GitHub Actions Runner for NixOS test supports, if the host supports it. | | `True` |
|
| `kvm` | Automatically configure the GitHub Actions Runner for NixOS test supports, if the host supports it. | | `true` |
|
||||||
| `planner` | A planner to use | | |
|
| `planner` | A planner to use | | |
|
||||||
| `proxy` | The proxy to use (if any), valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` | | |
|
| `proxy` | The proxy to use (if any), valid proxy bases are `https://$URL`, `http://$URL` and `socks5://$URL` | | |
|
||||||
| `reinstall` | Force a reinstall if an existing installation is detected (consider backing up `/nix/store`) | | `False` |
|
| `reinstall` | Force a reinstall if an existing installation is detected (consider backing up `/nix/store`) | | `false` |
|
||||||
| `source-binary` | Run a version of the nix-installer binary from somewhere already on disk. Conflicts with all other `source-*` options. Intended only for testing this Action. | | |
|
| `source-binary` | Run a version of the nix-installer binary from somewhere already on disk. Conflicts with all other `source-*` options. Intended only for testing this Action. | | |
|
||||||
| `source-branch` | The branch of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, `source-pr`) | | |
|
| `source-branch` | The branch of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, `source-pr`) | | |
|
||||||
| `source-pr` | The PR of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, `source-branch`) | | |
|
| `source-pr` | The PR of `nix-installer` to use (conflicts with `source-tag`, `source-revision`, `source-branch`) | | |
|
||||||
|
|
@ -113,7 +113,7 @@ updates:
|
||||||
| `diagnostic-endpoint` | Diagnostic endpoint url where the installer sends data to. To disable set this to an empty string. | | `-` |
|
| `diagnostic-endpoint` | Diagnostic endpoint url where the installer sends data to. To disable set this to an empty string. | | `-` |
|
||||||
| `log-directives` | A list of Tracing directives, comma separated, `-`s replaced with `_` (eg. `nix_installer=trace`, see https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives) | | |
|
| `log-directives` | A list of Tracing directives, comma separated, `-`s replaced with `_` (eg. `nix_installer=trace`, see https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives) | | |
|
||||||
| `logger` | The logger to use for install (eg. `pretty`, `json`, `full`, `compact`) | | |
|
| `logger` | The logger to use for install (eg. `pretty`, `json`, `full`, `compact`) | | |
|
||||||
| `_internal-strict-mode` | Whether to fail when any errors are thrown. Used only to test the Action; do not set this in your own workflows. | | `False` |
|
| `_internal-strict-mode` | Whether to fail when any errors are thrown. Used only to test the Action; do not set this in your own workflows. | | `false` |
|
||||||
|
|
||||||
## 🛟 Need Help? We're Here For You!
|
## 🛟 Need Help? We're Here For You!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import sys
|
||||||
def eprintln(line):
|
def eprintln(line):
|
||||||
print(line, file=sys.stderr)
|
print(line, file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
def make_inputs_table(inputs):
|
def make_inputs_table(inputs):
|
||||||
headers = ["Parameter", "Description", "Required", "Default"]
|
headers = ["Parameter", "Description", "Required", "Default"]
|
||||||
rows = []
|
rows = []
|
||||||
|
|
@ -16,12 +15,19 @@ def make_inputs_table(inputs):
|
||||||
required = input_options.get("required", False)
|
required = input_options.get("required", False)
|
||||||
default = input_options.get("default")
|
default = input_options.get("default")
|
||||||
|
|
||||||
|
if isinstance(default, bool):
|
||||||
|
default_str = f"`{str(default).lower()}`"
|
||||||
|
elif default is not None:
|
||||||
|
default_str = f"`{default}`"
|
||||||
|
else:
|
||||||
|
default_str = ""
|
||||||
|
|
||||||
rows.append(
|
rows.append(
|
||||||
[
|
[
|
||||||
f"`{input_name}`",
|
f"`{input_name}`",
|
||||||
input_options["description"],
|
input_options["description"],
|
||||||
"📍" if required else "",
|
"📍" if required else "",
|
||||||
f"`{default}`" if default is not None else "",
|
default_str,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue