mirror of
https://github.com/ryanccn/attic-action.git
synced 2024-11-19 22:16:35 +00:00
chore: don't use channels for testing (#3)
This commit is contained in:
parent
3b6f7992de
commit
ec939ca6ac
3 changed files with 13 additions and 10 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -38,4 +38,4 @@ jobs:
|
||||||
token: ${{ secrets.ATTIC_TOKEN }}
|
token: ${{ secrets.ATTIC_TOKEN }}
|
||||||
|
|
||||||
- name: Build Nix Package
|
- name: Build Nix Package
|
||||||
run: nix build -f test.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz --show-trace
|
run: nix build --impure --show-trace -L .#test
|
||||||
|
|
14
flake.nix
14
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "";
|
description = "Github Action for caching Nix derivations with attic";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
@ -26,6 +26,16 @@
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
formatter = forEachSystem (p: p.nixpkgs-fmt);
|
formatter = forEachSystem (p: p.alejandra);
|
||||||
|
|
||||||
|
packages = forEachSystem (p: let
|
||||||
|
time = toString builtins.currentTime;
|
||||||
|
test = p.runCommand "test-${time}" {} ''
|
||||||
|
echo ${time} > $out
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
inherit test;
|
||||||
|
default = test;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
7
test.nix
7
test.nix
|
@ -1,7 +0,0 @@
|
||||||
let
|
|
||||||
pkgs = import <nixpkgs> { };
|
|
||||||
time = with builtins; toString currentTime;
|
|
||||||
in
|
|
||||||
pkgs.runCommand "${time}-test" { } ''
|
|
||||||
echo "${time}" > $out
|
|
||||||
''
|
|
Loading…
Reference in a new issue