From 95e2ebdb36df1fa08836046a04fdddcca155a213 Mon Sep 17 00:00:00 2001 From: Gabor Pihaj Date: Sat, 30 Sep 2023 16:04:07 +0000 Subject: [PATCH] feat!: support multiple commands by accepting multiline string instead of a single command (#2) Reviewed-on: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic/pulls/2 BREAKING CHANGE: `command` settings is now not supported, use `script` instead Co-authored-by: Gabor Pihaj Co-committed-by: Gabor Pihaj --- flake.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 28be3df..f051aa9 100644 --- a/flake.nix +++ b/flake.nix @@ -33,9 +33,14 @@ fi - export PATH=/bin:/$PATH + cat << EOF >> run.sh + #!/usr/bin/env bash + export PATH=/bin:$PATH - ''${PLUGIN_COMMAND} + $PLUGIN_SCRIPT + EOF + + sh run.sh ''; }; nixImage = pkgs.dockerTools.pullImage { @@ -63,8 +68,10 @@ config.Cmd = ["/bin/woodpecker-nix-attic-entrypoint"]; diskSize = 2048; }; + latest = mkImage "latest"; in { - packages.x86_64-linux.woodpecker-plugin-nix-attic-latest = mkImage "latest"; + packages.x86_64-linux.default = mkImage null; + packages.x86_64-linux.woodpecker-plugin-nix-attic-latest = latest; packages.x86_64-linux.woodpecker-plugin-nix-attic-release = mkImage "0.1.0"; }; }