-
Notifications
You must be signed in to change notification settings - Fork 14
/
action.yml
86 lines (73 loc) · 2.99 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Nix Quick Install
description: Quickly installs Nix in unprivileged single-user mode
author: Rickard Nilsson
inputs:
nix_version:
required: true
default: "2.16.1"
description: |
The version of Nix that should be installed
If not specified, the latest stable Nix release is used. Note that each
release of nix-quick-install-action has a specific set of supported
Nix versions, which do not change. You can check what Nix versions are
supported by the version of nix-quick-install-action you're using by
going to https://github.com/nixbuild/nix-quick-install-action/releases
nix_conf:
required: false
description: |
If set, this configuration is written to XDG_CONFIG_HOME/nix/nix.conf,
which is read by Nix.
See https://nixos.org/manual/nix/stable/command-ref/conf-file.html for
information on what settings that are available. Make sure the settings
you define are supported by the Nix version you're using.
github_access_token:
default: ${{ github.token }}
description: |
Configure Nix to use the specified token when fetching from GitHub.
nix_on_tmpfs:
required: true
default: false
description: |
Installs /nix on a tmpfs mount. This can make Nix operations faster, but
you risk running out of memory if your Nix store grows to big. Only
enable this if you're absolutely sure the size of your Nix store (and
database, logs etc) will be considerably less than the available memory.
This option does nothing on MacOS runners.
nix_archives_url:
required: false
description: |
Don't use. For bootstrapping purposes only.
load_nixConfig:
default: true
description: |
Reads out a flakes 'nixConfig' attribute, if there is one, and loads
it into the environment config for old-style commands (`nix-build`,
`nix-store` etc) to pick it up.
If this cause undesired behaviour, you can switch it off by setting
this to false.
runs:
using: "composite"
steps:
- name: Install Nix in single-user mode
run: ${{ github.action_path }}/nix-quick-install.sh
shell: bash
env:
RELEASE_FILE: ${{ github.action_path }}/RELEASE
NIX_VERSION: ${{ inputs.nix_version }}
NIX_CONF: ${{ inputs.nix_conf }}
NIX_ARCHIVES_URL: ${{ inputs.nix_archives_url }}
NIX_ON_TMPFS: ${{ inputs.nix_on_tmpfs }}
GITHUB_ACCESS_TOKEN: ${{ inputs.github_access_token }}
- name: Preload nixConfig from Flake
# Boolean input should be compared with string until https://github.com/actions/runner/issues/2238 resolved
if: ${{ inputs.load_nixConfig == 'true' }}
run: ${{ github.action_path }}/read-nix-config-from-flake.sh
shell: bash
env:
NIX_VERSION: ${{ inputs.nix_version }}
GH_TOKEN: ${{ inputs.github_access_token }} # used by gh cli
OWNER_AND_REPO: ${{ github.repository }}
SHA: ${{ github.sha }}
branding:
icon: zap
color: gray-dark