Skip to content

Commit a5526c5

Browse files
committed
ci: init, shellcheck job
1 parent b7a213c commit a5526c5

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
shellcheck:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
- name: Install Nix
15+
uses: cachix/install-nix-action@v16
16+
- name: Shellcheck
17+
run: nix-shell --run 'shellcheck $(find . -type f -name "*.sh" -executable)'

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
description = "update-flake-lock";
3+
4+
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
5+
6+
outputs =
7+
{ self
8+
, nixpkgs
9+
}:
10+
let
11+
nameValuePair = name: value: { inherit name value; };
12+
genAttrs = names: f: builtins.listToAttrs (map (n: nameValuePair n (f n)) names);
13+
14+
allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
15+
forAllSystems = f: genAttrs allSystems
16+
(system: f {
17+
inherit system;
18+
pkgs = import nixpkgs { inherit system; };
19+
});
20+
in
21+
{
22+
devShell = forAllSystems
23+
({ system, pkgs, ... }:
24+
pkgs.stdenv.mkDerivation {
25+
name = "update-flake-lock-devshell";
26+
buildInputs = [ pkgs.shellcheck ];
27+
src = self;
28+
});
29+
};
30+
}

shell.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
(import
2+
(fetchTarball {
3+
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
4+
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
5+
})
6+
{ src = ./.; }).shellNix

0 commit comments

Comments
 (0)