diff --git a/setup/README.md b/setup/README.md index 49557a85..db41cd08 100644 --- a/setup/README.md +++ b/setup/README.md @@ -100,19 +100,20 @@ jobs: | Name | Description | Type | Default | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------- | -| `ghc-version` | GHC version to use, ex. `9.2` or `9.2.4`. | string | `latest` | -| `cabal-version` | Cabal version to use, ex. `3.4`. | string | `latest` | -| `stack-version` | Stack version to use, ex. `latest`. Stack will only be installed if `enable-stack` is set. | string | `latest` | +| `ghc-version` | GHC version to use, e.g. `9.2` or `9.2.4`. | `string` | `latest` | +| `cabal-version` | Cabal version to use, e.g. `3.4`. | `string` | `latest` | +| `stack-version` | Stack version to use, e.g. `latest`. Stack will only be installed if `enable-stack` is set. | `string` | `latest` | | `enable-stack` | If set, will setup Stack. | "boolean" | false/unset | | `stack-no-global` | If set, `enable-stack` must be set. Prevents installing GHC and Cabal globally. | "boolean" | false/unset | | `stack-setup-ghc` | If set, `enable-stack` must be set. Runs stack setup to install the specified GHC. (Note: setting this does _not_ imply `stack-no-global`.) | "boolean" | false/unset | | `disable-matcher` | If set, disables match messages from GHC as GitHub CI annotations. | "boolean" | false/unset | -| `cabal-update` | If set to `false`, skip `cabal update` step. | boolean | `true` | +| `cabal-update` | If set to `false`, skip `cabal update` step. | `boolean` | `true` | Note: "boolean" types are set/unset, not true/false. That is, setting any "boolean" to a value other than the empty string (`""`) will be considered true/set. +However, to avoid confusion and for forward compatibility, it is still recommended to **only use value `true` to set a "boolean" flag.** -In contrast, a proper `boolean` field only accepts values `true` and `false`. +In contrast, a proper `boolean` input like `cabal-update` only accepts values `true` and `false`. ## Outputs diff --git a/setup/action.yml b/setup/action.yml index 02128abe..bc047ec3 100644 --- a/setup/action.yml +++ b/setup/action.yml @@ -26,7 +26,10 @@ inputs: cabal-update: required: false default: true - description: 'Set to false to prevent `cabal update` from being run.' + description: 'Set to `false` to prevent `cabal update` from being run.' + # Note: 'cabal-update' only accepts 'true' and 'false' as values. + # This is different from the other flags ('enable-stack', 'disable-matcher' etc.) + # which are true as soon as they are not null. disable-matcher: required: false description: 'If specified, disables match messages from GHC as GitHub CI annotations.'