mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-09-27 05:50:00 +00:00
WIP: Build Hello image in CI
This commit is contained in:
parent
34507735a8
commit
0b00f87d61
2 changed files with 27 additions and 1 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -43,3 +43,7 @@ jobs:
|
||||||
# continue-on-error: true
|
# continue-on-error: true
|
||||||
|
|
||||||
- run: nix build
|
- 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 = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
@ -11,12 +11,33 @@
|
||||||
let
|
let
|
||||||
# pkgs = nixpkgs.legacyPackages.${system};
|
# pkgs = nixpkgs.legacyPackages.${system};
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
imagePkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
|
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
packages = {
|
packages = {
|
||||||
live-beats = pkgs.callPackage ./pkgs/live-beats { inherit pkgs self; };
|
live-beats = pkgs.callPackage ./pkgs/live-beats { inherit pkgs self; };
|
||||||
default = packages.live-beats;
|
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 {
|
dev = import ./pkgs/dev-shell {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
inputsFrom = [ packages.live-beats ];
|
||||||
db_name = "db_dev";
|
db_name = "db_dev";
|
||||||
# MIX_ENV = "dev";
|
# MIX_ENV = "dev";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue