Skip to content

Commit 6b09349

Browse files
authored
feat: skip-nix-install (#23)
We have some problems in our custom runner with this action so I've tried it with skipping the installation via the included action and it works in our runners (we do not use the GitHub provided ones, we are using custom runners). In case you are wondering which action we are using, we use: `cachix/install-nix-action@v23` - I guess it has something to do with the usage of `sudo` in the other action but I'm not 100% sure on that. I'm also not sure about the differences between these two actions so I've opted for the possibility to skip the installation rather than changing the action as I guess you've put a lot of thought into which action to use. Edit: I need to correct myself, it's not because of `sudo` but because of `systemd`. I tried to run the action without `systemd` by passing in `init: none` and `planner: linux-multi` but I got other errors. So I would prefer to be able to just skip the installation and use my own / a different action to install `nix`.
1 parent f013611 commit 6b09349

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
| devbox-version | Specify devbox CLI version you want to pin to. Only supports >0.2.2 | latest |
4040
| sha256-checksum | Specify an explicit checksum for the devbox binary | |
4141
| disable-nix-access-token | Disable configuration of nix access-tokens with the GitHub token used in the workflow | false |
42+
| skip-nix-installation | Skip the installation of nix | false |
4243

4344
### Example Configuration
4445

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ branding:
55
color: 'purple'
66

77
inputs:
8-
project-path: # path to folder
8+
project-path: # path to folder
99
description: 'Project path to devbox.json. Default to the root directory of the repository.'
1010
default: '.'
11-
enable-cache: # 'true' or 'false'
11+
enable-cache: # 'true' or 'false'
1212
description: 'Caching the entire Nix store in github based on your devbox.json'
1313
default: 'false'
1414
refresh-cli: # 'true' or 'false'
@@ -22,6 +22,9 @@ inputs:
2222
disable-nix-access-token: # 'true' or 'false'
2323
description: 'Disable configuration of nix access-tokens with the GitHub token used in the workflow'
2424
default: 'false'
25+
skip-nix-installation: # 'true' or 'false'
26+
description: 'Skip the installation of nix'
27+
default: 'false'
2528

2629
runs:
2730
using: "composite"
@@ -116,6 +119,7 @@ runs:
116119
echo "access-tokens = github.com=${{ github.token }}" >> ~/.config/nix/nix.conf
117120
118121
- name: Install nix
122+
if: inputs.skip-nix-installation == 'false'
119123
uses: DeterminateSystems/nix-installer-action@v4
120124
with:
121125
logger: pretty

0 commit comments

Comments
 (0)