mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-05-24 03:58:08 +00:00
WIP: Build Hello image in CI
This commit is contained in:
parent
34507735a8
commit
0b00f87d61
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -43,3 +43,7 @@ jobs:
|
|||
# continue-on-error: true
|
||||
|
||||
- run: nix build
|
||||
|
||||
# To get image and layered image into binary cache
|
||||
- run: nix build .#image
|
||||
- run: nix build .#layeredImage
|
||||
|
|
24
flake.nix
24
flake.nix
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "LiveBeats";
|
||||
description = "Play music together with Phoenix LiveView!";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
@ -11,12 +11,33 @@
|
|||
let
|
||||
# pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
imagePkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
|
||||
in
|
||||
rec {
|
||||
packages = {
|
||||
live-beats = pkgs.callPackage ./pkgs/live-beats { inherit pkgs self; };
|
||||
default = packages.live-beats;
|
||||
|
||||
image = pkgs.dockerTools.buildImage {
|
||||
name = "hello";
|
||||
tag = "latest";
|
||||
created = "now";
|
||||
copyToRoot = pkgs.buildEnv {
|
||||
name = "image-root";
|
||||
paths = [ pkgs.hello ];
|
||||
pathsToLink = [ "/bin" ];
|
||||
};
|
||||
|
||||
config.Cmd = [ "/bin/hello" ];
|
||||
};
|
||||
|
||||
layeredImage = pkgs.dockerTools.buildLayeredImage {
|
||||
name = "hello";
|
||||
config = {
|
||||
Cmd = [ "${pkgs.hello}/bin/hello" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -25,6 +46,7 @@
|
|||
|
||||
dev = import ./pkgs/dev-shell {
|
||||
inherit pkgs;
|
||||
inputsFrom = [ packages.live-beats ];
|
||||
db_name = "db_dev";
|
||||
# MIX_ENV = "dev";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue