From 4ad3c86c7aaf5d4d716086ba70a1519144b23126 Mon Sep 17 00:00:00 2001 From: Gabor Pihaj Date: Sat, 30 Sep 2023 18:15:22 +0000 Subject: [PATCH] fix: create the runner script outside of the workspace (#9) Reviewed-on: https://git.vdx.hu/voidcontext/woodpecker-plugin-nix-attic/pulls/9 Co-authored-by: Gabor Pihaj Co-committed-by: Gabor Pihaj --- entrypoint.nix | 6 ++++-- flake.nix | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/entrypoint.nix b/entrypoint.nix index 0b3356e..3d38461 100644 --- a/entrypoint.nix +++ b/entrypoint.nix @@ -19,7 +19,9 @@ pkgs.writeShellApplication { fi - cat << EOF >> run.sh + SCRIPT_DIR=$(mktemp -d) + + cat << EOF > "$SCRIPT_DIR"/run.sh #!/usr/bin/env bash export PATH=/bin:$PATH @@ -28,6 +30,6 @@ pkgs.writeShellApplication { $PLUGIN_SCRIPT EOF - sh run.sh + sh "$SCRIPT_DIR"/run.sh ''; } diff --git a/flake.nix b/flake.nix index 0191d51..986dd4a 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,6 @@ in { packages.x86_64-linux.default = mkImage null; packages.x86_64-linux.woodpecker-plugin-nix-attic-latest = mkImage "latest"; - packages.x86_64-linux.woodpecker-plugin-nix-attic-release = mkImage "0.1.0"; + packages.x86_64-linux.woodpecker-plugin-nix-attic-release = mkImage "0.1.1"; }; }