mirror of
https://github.com/DeterminateSystems/flake-checker-action.git
synced 2025-04-28 07:22:04 +02:00
Add initial README and action definition
This commit is contained in:
commit
413adfff73
3 changed files with 96 additions and 0 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
# https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
24
README.md
Normal file
24
README.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# The Determinate flake checker Action
|
||||
|
||||
Here's an example configuration:
|
||||
|
||||
```yaml
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Nix targets
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check Nix flake inputs
|
||||
uses: DeterminateSystems/flake-checker-action@v1
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v3
|
||||
- name: Build default package
|
||||
run: |
|
||||
nix build
|
||||
```
|
62
action.yml
Normal file
62
action.yml
Normal file
|
@ -0,0 +1,62 @@
|
|||
name: The Determinate Systems flake checker
|
||||
description: TODO
|
||||
branding:
|
||||
icon: "box"
|
||||
color: "purple"
|
||||
inputs:
|
||||
flake-lock-path:
|
||||
description: TODO
|
||||
default: flake.lock
|
||||
send-statistics:
|
||||
description: |
|
||||
Anonymously report the number issues detected by the flake checker, which helps
|
||||
measure the effectiveness of the flake checker. Set to `false` to disable.
|
||||
default: true
|
||||
check-outdated:
|
||||
description: TODO
|
||||
default: true
|
||||
check-owner:
|
||||
description: TODO
|
||||
default: true
|
||||
check-supported:
|
||||
description: TODO
|
||||
default: true
|
||||
ignore-missing-flake-lock:
|
||||
description: TODO
|
||||
default: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Install the flake checker
|
||||
shell: bash
|
||||
run: |
|
||||
(
|
||||
set -eu
|
||||
|
||||
curl --max-time 2 --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/flake-checker/stable/$RUNNER_ARCH-$RUNNER_OS > "$RUNNER_TEMP/flake-checker"
|
||||
chmod +x "$RUNNER_TEMP/flake-checker"
|
||||
|
||||
export NIX_FLAKE_CHECKER_FLAKE_LOCK_PATH="${{ inputs.flake-lock-path }}"
|
||||
|
||||
if [ "${{ inputs.send-statistics }}" == "false" ]; then
|
||||
export NIX_FLAKE_CHECKER_NO_TELEMETRY="false"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.check-outdated }}" == "false" ]; then
|
||||
export NIX_FLAKE_CHECKER_CHECK_OUTDATED="false"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.check-owner }}" == "false" ]; then
|
||||
export NIX_FLAKE_CHECKER_CHECK_OWNER="false"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.check-supported }}" == "false" ]; then
|
||||
export NIX_FLAKE_CHECKER_CHECK_SUPPORTED="false"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.ignore-missing-flake-lock }}" == "false" ]; then
|
||||
export NIX_FLAKE_CHECKER_IGNORE_MISSING_FLAKE_LOCK="false"
|
||||
fi
|
||||
|
||||
"$RUNNER_TEMP/flake-checker"
|
||||
) || true
|
Loading…
Add table
Reference in a new issue