Commit graph

37 commits

Author SHA1 Message Date
Domen Kožar
2689c27f57
better error message 2021-04-02 17:26:57 +02:00
Sascha Grunert
f1560b98ab
Add pushFilter to allow filtering cache derivations
This allows filtering derivations to be pushed via an optional
`pushFilter` variable.

The use case behind it is to not push the actually built derivation, but
only runtime and build dependencies.

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-02-18 16:30:08 +01:00
Domen Kožar
26cfe1ed98
Merge pull request #76 from zimbatm/no-unstable
only use stable nix commands
2021-01-25 13:23:31 +00:00
zimbatm
9831d0f47e
nix: only use stable commands
Avoid the following error when installing nix-unstable:

    experimental Nix feature 'nix-command' is disabled; use '--experimental-features nix-command' to override
2021-01-25 13:20:24 +01:00
zimbatm
dd289524af
fixup! clean error outputs 2021-01-05 00:42:04 +01:00
zimbatm
f22d9c7a0f
clean error outputs
On error, just mark the error with `core.setFailed`, this is enough to
kill the process.

Replace child_process.execFileSync with '@actions/exec'.exec to be async
all the way.
2021-01-02 21:54:58 +01:00
Domen Kožar
07abd5e5db
find cachix executable by not hardcoding the user 2020-11-10 14:39:00 +01:00
Domen Kožar
25971529fd
allow auth token to be enough for pushing paths 2020-11-10 14:20:48 +01:00
Domen Kožar
754a40db11
speed up client installation a bit 2020-09-23 17:08:47 +02:00
zimbatm
ffed6b919f
add installCommand option
By using installCommand, it's possible to avoid yet another pull of
nixpkgs and speed-up the CI.
2020-08-26 21:18:01 +02:00
Gary Coady
49b785b55a Adds extra caches for pulling from (binary substitution).
Creates an `extraPullNames` parameter, to mimic the existing `name`
parameter. This string should be a comma-separated set of cache names.
2020-06-23 11:20:12 +02:00
Domen Kožar
13e2cf25a1
Don't try to push store paths that were GCed
Previously we'd only push unique paths before/after the job,
but that's not good enough because someone might run garbage
collection.

Now we only push unique store paths that are in the list of
when the job finished.
2020-05-12 10:50:05 +02:00
zimbatm
b8b745f3a7
WIP: save cache on post
Instead of trying to do everything in the action, push the cache at the
end. This allows to run other actions in between.
2020-04-17 12:20:05 +02:00
Jörg Thalheim
36fc8c5254
Make cachix install quiet
Since this mainly downloads dependencies, removing it, removes some noise.
2020-04-16 05:19:59 +01:00
Domen Kožar
e1a832de5b
A tiny bit more consistent logging 2020-03-14 11:49:51 +01:00
Domen Kožar
a3cf8f1b39
call nix-build even if signing key is not set 2020-02-29 18:27:13 +01:00
Domen Kožar
7bea2cc0c1
Simplify how paths are pushed
Previously we were setting up Nix build hook to make sure all paths are
synced to cachix.

This had a few flaws:

- nix-daemon had to be restarted, resulting into a few seconds extra
  setup per each build
- spurious error on macos due to nix-daemon socket not ready in time
- significant overhead since syncing to cachix was synchronous for each
  derivation built

Now we just look for new store paths and push those after nix-build.
2020-02-27 16:51:03 +01:00
Tobias Happ
a03feca499
Add nixBuildArgs parameter 2020-02-27 16:46:25 +01:00
Domen Kožar
76bd1745d3
Allow Nix to be installed in single-user mode
(cherry picked from commit 476599180e7c5d616cb06a852a564bd56298e468)
Signed-off-by: Domen Kožar <domen@dev.si>
2020-02-27 16:46:24 +01:00
Domen Kožar
a174b4716e
fix pushing of paths 2020-02-27 16:46:24 +01:00
Domen Kožar
074294984a
Allow skipping nix-build 2019-12-19 17:23:34 +01:00
Domen Kožar
7fd13f5091
use cachix official installation url 2019-12-17 19:28:50 +01:00
Domen Kožar
49264ff2e8
Update src/main.ts
Co-Authored-By: Robert Hensing <roberth@users.noreply.github.com>
2019-10-03 16:42:28 +02:00
Domen Kožar
f80d6f9d98
Support pull requests 2019-10-03 16:32:37 +02:00
Domen Kožar
e1972a3e88
fix for #3 2019-10-03 15:43:16 +02:00
Domen Kožar
5e116bc9ac
push -> name 2019-10-03 13:48:28 +02:00
Domen Kožar
34a3c66a7e
saneSplit -> nonEmptySplit 2019-10-03 13:26:42 +02:00
Domen Kožar
cea7883cb2
utils -> strings 2019-10-03 13:21:06 +02:00
Domen Kožar
453bd5c328
Support private caches 2019-10-03 12:40:29 +02:00
Domen Kožar
70e7e680d7
use cachix 0.3.4 2019-10-03 12:40:09 +02:00
Domen Kožar
eea1c8cee8
use cachix 0.3.4 2019-10-03 10:35:39 +02:00
Domen Kožar
0d877d4d59
Split Nix installation into separate action 2019-10-02 16:25:24 +02:00
Domen Kožar
b14833e3eb
Bump cachix to development to solve a bug 2019-10-01 14:30:41 +02:00
Domen Kožar
252ae9fce0
set NIX_PATH 2019-10-01 12:15:48 +02:00
Domen Kožar
c97af141f3
use sane version of split 2019-10-01 12:10:07 +02:00
Domen Kožar
4db446a512
Install Nix via the action 2019-10-01 11:54:05 +02:00
Domen Kožar
a6de7cd0c2
Initial commit 2019-09-30 15:32:36 +02:00