From 7bdbe146aa83ed81fe935908b8bc76332403a0e1 Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 15 May 2025 16:32:20 -0400 Subject: [PATCH 1/2] Fix rendering of Booleans --- README.md | 10 +++++----- tools/generate.py | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d50fbed..c6cf322 100644 --- a/README.md +++ b/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) | | | | `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 }}` | -| `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` | +| `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` | | `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 | | | | `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-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`) | | | @@ -113,7 +113,7 @@ updates: | `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) | | | | `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! diff --git a/tools/generate.py b/tools/generate.py index 884f587..696d4a1 100644 --- a/tools/generate.py +++ b/tools/generate.py @@ -8,7 +8,6 @@ import sys def eprintln(line): print(line, file=sys.stderr) - def make_inputs_table(inputs): headers = ["Parameter", "Description", "Required", "Default"] rows = [] @@ -16,12 +15,19 @@ def make_inputs_table(inputs): required = input_options.get("required", False) 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( [ f"`{input_name}`", input_options["description"], "📍" if required else "", - f"`{default}`" if default is not None else "", + default_str, ] ) From 1ae6376b0c5683fe84d7d1121fd1191c915f1b9c Mon Sep 17 00:00:00 2001 From: Luc Perkins Date: Thu, 15 May 2025 16:34:52 -0400 Subject: [PATCH 2/2] Fix formatting issue --- tools/generate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/generate.py b/tools/generate.py index 696d4a1..fcf01a1 100644 --- a/tools/generate.py +++ b/tools/generate.py @@ -8,6 +8,7 @@ import sys def eprintln(line): print(line, file=sys.stderr) + def make_inputs_table(inputs): headers = ["Parameter", "Description", "Required", "Default"] rows = []