This commit is contained in:
parent
c8d1b23d71
commit
c8c7270ee0
3 changed files with 16 additions and 32 deletions
5
.github/workflows/build.yaml
vendored
5
.github/workflows/build.yaml
vendored
|
@ -6,11 +6,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: docker.io/jcollie/nixos-runner:latest
|
container: docker.io/jcollie/nixos-runner:latest
|
||||||
steps:
|
steps:
|
||||||
- run: ldd /__e/node16/bin/node
|
|
||||||
- run: echo "ld-library-path=${LD_LIBRARY_PATH}" >> $GITHUB_OUTPUT
|
|
||||||
id: ld-library-path
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
env:
|
|
||||||
LD_LIBRARY_PATH: ${{ steps.ld-library-path.outputs.ld-library-path }}
|
|
||||||
- run: nix -L build .#nixos-runner
|
- run: nix -L build .#nixos-runner
|
||||||
- run: nix run .#push-container -- result --registry ghcr.io --repository jcollie/nixos-runner
|
- run: nix run .#push-container -- result --registry ghcr.io --repository jcollie/nixos-runner
|
||||||
|
|
19
flake.nix
19
flake.nix
|
@ -378,21 +378,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
apps = {
|
apps = {
|
||||||
push-container =
|
push-container = {
|
||||||
let
|
type = "app";
|
||||||
script = pkgs.writeTextFile {
|
program = "${self.packages.${system}.push-container}/bin/push-container";
|
||||||
name = "push-container";
|
};
|
||||||
text = lib.concatStringsSep "\n" [
|
|
||||||
"#!${pkgs.nushell}/bin/nu"
|
|
||||||
(builtins.readFile ./push-container.nu)
|
|
||||||
];
|
|
||||||
executable = true;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
type = "app";
|
|
||||||
program = "${script}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -24,24 +24,24 @@ def main [
|
||||||
$tags
|
$tags
|
||||||
}
|
}
|
||||||
|
|
||||||
let tags = if (
|
|
||||||
(not $no_drone_tag)
|
|
||||||
and
|
|
||||||
(not ($env | get -i DRONE_BUILD_NUMBER | is-empty))
|
|
||||||
and
|
|
||||||
(not ($env | get -i DRONE_COMMIT_SHA | is-empty))
|
|
||||||
) {
|
|
||||||
$tags | append $"($env.DRONE_BUILD_NUMBER)-($env.DRONE_COMMIT_SHA | str substring 0..8)"
|
|
||||||
} else {
|
|
||||||
$tags
|
|
||||||
}
|
|
||||||
|
|
||||||
let tags = if (
|
let tags = if (
|
||||||
(not $no_github_tag)
|
(not $no_github_tag)
|
||||||
and
|
and
|
||||||
(not ($env | get -i GITHUB_RUN_NUMBER | is-empty))
|
(not ($env | get -i GITHUB_RUN_NUMBER | is-empty))
|
||||||
and
|
and
|
||||||
(not ($env | get -i GITHUB_SHA | is-empty))
|
(not ($env | get -i GITHUB_SHA | is-empty))
|
||||||
|
) {
|
||||||
|
$tags | append $"($env.GITHUB_RUN_NUMBER)-($env.GITHUB_SHA | str substring 0..8)"
|
||||||
|
} else {
|
||||||
|
$tags
|
||||||
|
}
|
||||||
|
|
||||||
|
let tags = if (
|
||||||
|
(not $no_drone_tag)
|
||||||
|
and
|
||||||
|
(not ($env | get -i DRONE_BUILD_NUMBER | is-empty))
|
||||||
|
and
|
||||||
|
(not ($env | get -i DRONE_COMMIT_SHA | is-empty))
|
||||||
) {
|
) {
|
||||||
$tags | append $"($env.DRONE_BUILD_NUMBER)-($env.DRONE_COMMIT_SHA | str substring 0..8)"
|
$tags | append $"($env.DRONE_BUILD_NUMBER)-($env.DRONE_COMMIT_SHA | str substring 0..8)"
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue