Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration docs to README #1

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,30 @@ jobs:
run: nix build
```

## Configuration

The Flake Checker Action has a number of configuration parameters that you can set in the `with` block:

Parameter | Description | Default
:---------|:------------|:-------
`flake-lock-path` | The path to the `flake.lock` file you want to check. | `flake.lock`
`check-outdated` | Whether to check that the root Nixpkgs input is less than 30 days old. | `true`
`check-owner` | Whether to check that the root Nixpkgs input has the `NixOS` GitHub org as its owner. | `true`
`check-supported` | Whether to check that the root Nixpkgs input has a supported Git ref. Currently supported refs: `nixos-22.11`, `nixos-22.11-small`, `nixos-23.05`, `nixos-23.05-small`, `nixos-unstable`, `nixos-unstable-small`, `nixpkgs-22.11-darwin`, `nixpkgs-23.05-darwin`, `nixpkgs-unstable`. | `true`
`ignore-missing-flake-lock` | Whether to ignore a missing `flake.lock` file, where the path to the file is the value of `flake-lock-path` parameter. If set to `false` (the default is `true`), the Action throws an error and the job fails if the lockfile is missing. | `true`
`send-statistics` | Anonymously report the number of issues detected by the flake checker. This reporting helps measure the effectiveness of the flake checker. Set to `false` to disable. | `true`

Here's an example non-default configuration:

```yaml
- name: Check Nix flake inputs
uses: DeterminateSystems/flake-checker-action@v1
with:
flake-lock-path: ./nix/flake.lock
check-owner: false
ignore-missing-flake-lock: false
```

[action]: https://github.com/features/actions
[detsys]: https://determinate.systems
[lock]: https://zero-to-nix.com/concepts/flakes#lockfile
Expand Down
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ inputs:
description: |
The path to the `flake.lock` file you want to check.
default: flake.lock
send-statistics:
description: |
Anonymously report the number of issues detected by the flake checker. This reporting helps
measure the effectiveness of the flake checker. Set to `false` to disable.
default: true
check-outdated:
description: |
Whether to check that the root Nixpkgs input is less than 30 days old.
Expand All @@ -25,14 +20,19 @@ inputs:
check-supported:
description: |
Whether to check that the root Nixpkgs input has a supported Git ref. Currently supported
ref: `nixos-22.11`, `nixos-22.11-small`, `nixos-23.05`, `nixos-23.05-small`, `nixos-unstable`,
refs: `nixos-22.11`, `nixos-22.11-small`, `nixos-23.05`, `nixos-23.05-small`, `nixos-unstable`,
`nixos-unstable-small`, `nixpkgs-22.11-darwin`, `nixpkgs-23.05-darwin`, `nixpkgs-unstable`.
default: true
ignore-missing-flake-lock:
description: |
Whether to ignore a missing `flake.lock` file, where the path to the file is the value of
`flake-lock-path` parameter. If set to `false` (the default is `true`), the Action throws
an error if the lockfile is missing.
an error and the job fails if the lockfile is missing.
default: true
send-statistics:
description: |
Anonymously report the number of issues detected by the flake checker. This reporting helps
measure the effectiveness of the flake checker. Set to `false` to disable.
default: true
runs:
using: composite
Expand Down