Merge pull request 'inline action-checkout' (#67) from flake-parts-refactoring into main
All checks were successful
build / test (push) Successful in 7s

Reviewed-on: #67
This commit is contained in:
Mic92 2023-08-03 14:58:32 +00:00
commit 2d8c393bb5
6 changed files with 6 additions and 28 deletions

View File

@ -34,7 +34,7 @@ let
HOME = "/run/${name}"; HOME = "/run/${name}";
# used by action-checkout # used by action-flake-update-pr-clan
REPO_DIR = "/run/${name}/repo"; REPO_DIR = "/run/${name}/repo";
# used by git # used by git

View File

@ -1,9 +0,0 @@
{ bash
, coreutils
, git
, openssh
, writePureShellScriptBin
}:
writePureShellScriptBin "action-checkout" [ bash coreutils git openssh ] ''
bash ${./script.sh}
''

View File

@ -1,10 +0,0 @@
#!/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

@ -1,6 +1,6 @@
{ bash { bash
, coreutils , coreutils
, action-checkout , git
, action-ensure-tea-login , action-ensure-tea-login
, action-create-pr , action-create-pr
, action-flake-update , action-flake-update
@ -9,7 +9,7 @@
writePureShellScriptBin "action-flake-update-pr-clan" [ writePureShellScriptBin "action-flake-update-pr-clan" [
bash bash
coreutils coreutils
action-checkout git
action-ensure-tea-login action-ensure-tea-login
action-create-pr action-create-pr
action-flake-update action-flake-update

View File

@ -15,8 +15,8 @@ export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_NAME"
export GITEA_USER="clan-bot" export GITEA_USER="clan-bot"
export GITEA_URL="https://git.clan.lol" export GITEA_URL="https://git.clan.lol"
action-checkout git clone --depth 1 --branch main "$REPO" "$REPO_DIR"
cd $REPO_DIR cd "$REPO_DIR"
action-ensure-tea-login action-ensure-tea-login
action-flake-update action-flake-update
action-create-pr --assignees clan-bot action-create-pr --assignees clan-bot

View File

@ -4,9 +4,6 @@
inherit (pkgs.callPackage ./renovate { }) renovate; inherit (pkgs.callPackage ./renovate { }) renovate;
gitea = pkgs.callPackage ./gitea { }; gitea = pkgs.callPackage ./gitea { };
action-checkout = pkgs.callPackage ./action-checkout {
inherit (config.writers) writePureShellScriptBin;
};
action-create-pr = pkgs.callPackage ./action-create-pr { action-create-pr = pkgs.callPackage ./action-create-pr {
inherit (config.writers) writePureShellScriptBin; inherit (config.writers) writePureShellScriptBin;
}; };
@ -18,7 +15,7 @@
}; };
action-flake-update-pr-clan = pkgs.callPackage ./action-flake-update-pr-clan { action-flake-update-pr-clan = pkgs.callPackage ./action-flake-update-pr-clan {
inherit (config.writers) writePureShellScriptBin; inherit (config.writers) writePureShellScriptBin;
inherit (config.packages) action-checkout action-ensure-tea-login action-create-pr action-flake-update; inherit (config.packages) action-ensure-tea-login action-create-pr action-flake-update;
}; };
inherit (pkgs.callPackages ./job-flake-updates { inherit (pkgs.callPackages ./job-flake-updates {
inherit (config.writers) writePureShellScriptBin; inherit (config.writers) writePureShellScriptBin;