add actions and jobs for automatic updates #38

Merged
clan-bot merged 11 commits from actions into main 2023-07-28 12:03:45 +00:00
3 changed files with 35 additions and 0 deletions
Showing only changes of commit 119423deb5 - Show all commits

View File

@ -0,0 +1,24 @@
{
perSystem =
{ config
, pkgs
, ...
}:
let
name = builtins.baseNameOf ./.;
script = config.writers.writePureShellScriptBin
name
[
pkgs.bash
pkgs.coreutils
pkgs.git
pkgs.openssh
]
''
bash ${./script.sh}
'';
in
{
packages.${name} = script;
};
}

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
# load BRANCH variable with default
BRANCH=${BRANCH:-main}
# load REPO_DIR variable with default
export REPO_DIR=${REPO_DIR:-.}
git clone --depth 1 --branch $BRANCH $REPO $REPO_DIR

View File

@ -42,6 +42,7 @@
imports = [
inputs.treefmt-nix.flakeModule
inputs.clan-core.modules.flake-parts.writers
./flake-parts/action-checkout
./flake-parts/action-flake-update
./flake-parts/action-create-pr
./targets/flake-module.nix