-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yaml
49 lines (47 loc) · 1.69 KB
/
action.yaml
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
name: Run nix-shell scripts
description: Executes shell scripts using nix-shell.
inputs:
run:
type: string
required: true
description: The path to a file that contains shell code or the actual shell code.
pure:
type: boolean
default: true
description: Whether to run the script with the `--pure` option. Defaults to `true`.
options:
type: string
description: Any parameters that are to be passed to nix-shell are specified here.
working-directory:
type: string
description: |
The path where the script will be executed. This is not the path where nix-shell is executed.
default: .
derivation-path:
type: string
description: |
The path to directory or the shell.nix or default.nix to use to set up the environment. This
is the directory where nix-shell is executed.
shell-flags:
type: string
default: set -o errexit -o nounset -o pipefail
description: These flags will be set before executing the script.
verbose:
type: boolean
description: Enable debug output written to stderr.
default: false
runs:
using: composite
steps:
- shell: bash
env:
RNS_CWD: ${{ inputs.working-directory }}
RNS_OPTS: ${{ inputs.options }}
RNS_RUN: ${{ inputs.run }}
RNS_PURE: ${{ inputs.pure }}
RNS_DERIVATION_PATH: ${{ inputs.derivation-path }}
RNS_VERBOSE: ${{ inputs.verbose }}
# If the client specifies an empty string for the flags, we need to set the RNS_SHELL_FLAGS
# env variable to the special value false.
RNS_SHELL_FLAGS: ${{ inputs.shell-flags == '' && 'false' || inputs.shell-flags }}
run: ${GITHUB_ACTION_PATH}/tools/run_nix_shell.sh