Commit graph

175 commits

Author SHA1 Message Date
Luc Perkins
74b8a1f4e8
Update dependencies 2024-05-03 11:05:02 -03:00
Luc Perkins
51bc05e2ea
Fix method of finding docker shims 2024-05-02 17:19:07 -03:00
Luc Perkins
9ffa76fa74
Fix ESM build 2024-05-02 17:07:51 -03:00
Luc Perkins
10f43c0d32
Merge pull request #82 from DeterminateSystems/tsup-build
Switch to tsup for building
2024-05-02 16:45:35 -03:00
Luc Perkins
337589f84d
Switch to tsup for building 2024-05-02 16:35:58 -03:00
Luc Perkins
330a0ca1bc
Merge pull request #80 from DeterminateSystems/update-checkout-action
Standardize on v4 of the checkout action
2024-05-02 14:20:56 -03:00
Luc Perkins
2c90bb97d0
Standardize on v4 of the checkout action 2024-05-02 14:10:17 -03:00
Luc Perkins
91b8eb110e
Merge pull request #79 from DeterminateSystems/fix-mnc-issue
Fix broken CI
2024-05-02 14:05:28 -03:00
Luc Perkins
ff2ea37e97
Remove MNC from workflow 2024-05-02 13:58:19 -03:00
Luc Perkins
f957521643
Reinstate the MNC prior to reinstall 2024-05-02 13:54:44 -03:00
Luc Perkins
23ddac323e
Remove second reinstall setting 2024-05-02 13:49:26 -03:00
Luc Perkins
3785eaaa9b
Fix other instance of uninstall/reinstall 2024-05-02 13:48:27 -03:00
Luc Perkins
6b7860826e
Remove reinstall setting 2024-05-02 13:47:23 -03:00
Luc Perkins
f69dd1d935
Merge pull request #76 from DeterminateSystems/general-cleanup
General JS cleanup
2024-05-02 13:09:27 -03:00
Luc Perkins
ff707a0bf7
Fix merge conflict with main 2024-05-02 13:03:16 -03:00
Cole Helbling
7d2a9c4c9d
Merge pull request #77 from DeterminateSystems/flakehub-fallback
Gracefully handle FlakeHub login failure
2024-05-02 07:15:43 -07:00
Luc Perkins
1ebf6caddc
Remove unnecessary dependencies 2024-05-02 11:05:47 -03:00
Luc Perkins
7acbc80e00
Add names to CI steps 2024-05-02 10:56:42 -03:00
Luc Perkins
57a6360160
Fix build issue due to detsys-ts update 2024-05-02 10:52:54 -03:00
Luc Perkins
a2856cdfd2
Prefer coalescing over or-ing 2024-04-24 11:13:40 -03:00
Luc Perkins
b87931b2dd
Add camelcase check 2024-04-24 11:09:55 -03:00
Cole Helbling
413ac98332 Gracefully handle FlakeHub login failure 2024-04-23 09:55:39 -07:00
Luc Perkins
86cdba7a6e
Switch to git diff --exit-code 2024-04-22 13:17:32 -03:00
Luc Perkins
c9a02f1141
Use bracket notation for env vars 2024-04-15 19:42:44 -03:00
Luc Perkins
413fb1beb4
Constify events and facts 2024-04-15 19:34:51 -03:00
Luc Perkins
8f4ca496eb
Enforce proper casing 2024-04-15 19:23:29 -03:00
Luc Perkins
c89881253c
Use detsys-ts functions for inputs 2024-04-15 19:09:42 -03:00
Graham Christensen
5c49fa4feb
Update detsys-ts (#75) 2024-04-12 15:31:59 -04:00
Graham Christensen
5d2215c1e1
Rebase on top of detsys-ts for abstracting over install.determinate.systems (#74)
* Rebase on top of detsys-ts for abstracting over install.determinate.systems

* Support the legacy nix-installer-xxx source prefs

* Document source-* opts

* Update deps

* cut duration so it doesn't take forever

* Move the complete step into a finally block

* Test a busted run

* come on ...

* update to the main detsys-ts

* Switch to the delegated execution model

* throw an error to check behavior

* Fixup lint errors

* Drop the forced error
2024-04-11 11:58:56 -04:00
Graham Christensen
de22e16c47
DETERMINATE_NIX_KVM fixup, support Magic Nix Cache + FlakeHub Cache on Namespace runners (#72)
* Share /bin with nix for post-build-hooks

* test the magic nix cache

* wtf

* permissions

* Share /home and the network namespace too

* test the devshell

* Don't force-set kvm to 0 ... d'oh!

* dev shell support for aarch64-linux

* ?

* More testing /  debug

* Make it run anyway

* Bind /lib too so /bin/sh works ... sigh

* Disable gha-cache for tesing

* Kill the magic nix cache before reinstalling

* Don't set the extra environment variables extraniously

* Enable gha cache again
2024-03-11 19:53:25 -04:00
Ana Hobden
e279ba56d8
Merge pull request #67 from DeterminateSystems/hoverbear/fh-161-after-running-in-act-hosts-nix-daemon-is-unusable
Don't use docker shim if only using a mounted docker.sock instead of docker-in-docker
2024-01-11 07:55:46 -08:00
Ana Hobden
f4a0ffe230 Don't use docker shim if only using a mounted docker.sock instead of docker-in-docker 2024-01-10 11:45:04 -08:00
Ana Hobden
ffea801f30
Merge pull request #66 from DeterminateSystems/hoverbear/fh-160-action-should-work-under-nektosact-in-the-absence-of-systemd
Handle docker not existing.
2024-01-10 08:36:26 -08:00
Ana Hobden
4126bb83b3 Merge branch 'main' into hoverbear/fh-160-action-should-work-under-nektosact-in-the-absence-of-systemd 2024-01-09 10:38:56 -08:00
Ana Hobden
81ee88fd4a Handle docker not existing 2024-01-09 10:36:54 -08:00
Ana Hobden
0f8fa3d242
Merge pull request #64 from DeterminateSystems/hoverbear/fh-156-installer-action-shouldnt-require-sudo
No longer require sudo
2024-01-09 09:50:39 -08:00
Ana Hobden
f576e90e2d Fix logic inversion 2024-01-08 13:29:15 -08:00
Ana Hobden
161c1f6904 Use uid not username 2024-01-08 13:06:51 -08:00
Ana Hobden
0e5b724979 No longer require sudo 2024-01-08 10:50:02 -08:00
Cole Mickens
21affdd5d3
action: post-run-job: try clean daemon container, warn on failure (#61)
* flake: add typescript LSP tool

* action: post-run-job: try clean daemon container, warn on failure
2023-12-19 11:01:56 -05:00
Graham Christensen
cd46bde16a
Support GitHub Enterprise Server using ARC (#59)
* Test nix-installer-action on Namespace.so

It is special in that it doesn't have systemd, and it'd be great to
support Namespace.so. It is also a good test case for a variety
of self-hosted GHA runner use cases.

* Make correlation more confident

* Borrow docker as a process supervisor on Linux GHA runners without systemd

This change introduces a Docker container shim which spawns the Nix
daemon after bind mounting all the relevant paths into the container.

The image is actually completely empty, other than metadata about what
to run.

This is a cheap and cheerful way to get decent process supervision in
environments that don't bring systemd, but do have docker ... which
is most everywhere in the GHA ecosystem.

* Ignore generated files

* Run on arm64 why not

* Load a pre-built image, don't build

* Check the userInfo.username instead of an env var

* Stop double-printing output to the console

* can't rm and restart

* what

* Clean up the container at the end

* Emit the fetch line in the 'installing nix' section

* tweak output

* delete what
2023-12-04 14:17:47 -05:00
Graham Christensen
84fe9e450f
Support GitHub Enterprise Server in the github-token access token. (#58) 2023-12-01 10:23:32 -05:00
Graham Christensen
07b8bcba1b
KVM support out of the box, plus a refreshed README (#56)
* support kvm

* Refresh the readme

* Update README.md

Co-authored-by: Ana Hobden <operator@hoverbear.org>

* Update README.md

Co-authored-by: Luc Perkins <lucperkins@gmail.com>

* Update README.md

---------

Co-authored-by: Ana Hobden <operator@hoverbear.org>
Co-authored-by: Luc Perkins <lucperkins@gmail.com>
2023-11-21 19:06:06 +00:00
Ana Hobden
5620eb4af6
Merge pull request #53 from DeterminateSystems/use-github-tool-cache-and-exec
Use Github Actions provided tool cache and exec
2023-11-03 08:31:14 -07:00
Ana Hobden
8b5f066806 Use Github Actions provided tool cache and exec 2023-11-02 10:48:10 -07:00
Hugo Santos
7fa8f59903
Detected whether we're running in a Namespace runner, and if so, set init: none. (#52)
Background: Namespace managed runners run each github job in a container, in a
separate micro-vm managed by Namespace. These VMs and containers do not rely on
systemd, and instead use Namespace's own init/process management.
2023-11-02 15:58:37 +00:00
Ana Hobden
721f94f7df
Merge pull request #47 from DeterminateSystems/colemickens/fix-stream-close
fix: end the FileStreamWriter for the installer file
2023-10-24 09:22:10 -07:00
Cole Mickens
bb22c86823
retries: autoClose, but open file with O_SYNC 2023-10-24 18:01:08 +02:00
Cole Mickens
d46d5b144a
retries: switch back to piping with non-web node streams 2023-10-24 17:45:43 +02:00
Cole Mickens
663467bee8
main.ts: installer use filehandle, make sure we fsync it before close 2023-10-24 17:35:04 +02:00