mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 16:58:55 +00:00
Push builds to cachix
This commit is contained in:
parent
e73247e7d4
commit
500eadeed0
2 changed files with 26 additions and 0 deletions
20
.github/workflows/build_test.yml
vendored
20
.github/workflows/build_test.yml
vendored
|
@ -67,3 +67,23 @@ jobs:
|
||||||
run: cargo test
|
run: cargo test
|
||||||
env:
|
env:
|
||||||
SQLX_OFFLINE: "true"
|
SQLX_OFFLINE: "true"
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: cachix/install-nix-action@v20
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
id: cargo
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy
|
||||||
|
- uses: cachix/cachix-action@v12
|
||||||
|
with:
|
||||||
|
name: natsukagami
|
||||||
|
# If you chose API tokens for write access OR if you have a private cache
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Run nix build
|
||||||
|
run: nix build
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
naersk.inputs.nixpkgs.follows = "nixpkgs";
|
naersk.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
nixConfig = {
|
||||||
|
extra-substituters = [ "https://natsukagami.cachix.org" ];
|
||||||
|
trusted-public-keys = [ "natsukagami.cachix.org-1:3U6GV8i8gWEaXRUuXd2S4ASfYgdl2QFPWg4BKPbmYiQ=" ];
|
||||||
|
};
|
||||||
outputs = { self, nixpkgs, naersk, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
|
outputs = { self, nixpkgs, naersk, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
@ -27,6 +31,8 @@
|
||||||
nativeBuildInputs = nixpkgs.lib.optionals pkgs.stdenv.isLinux (with pkgs; [
|
nativeBuildInputs = nixpkgs.lib.optionals pkgs.stdenv.isLinux (with pkgs; [
|
||||||
pkg-config
|
pkg-config
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
SQLX_OFFLINE = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPackage = packages.youmubot;
|
defaultPackage = packages.youmubot;
|
||||||
|
|
Loading…
Add table
Reference in a new issue