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 <gabor.pihaj@gmail.com>
Co-committed-by: Gabor Pihaj <gabor.pihaj@gmail.com>
This commit is contained in:
Gabor Pihaj 2023-09-30 16:04:07 +00:00 committed by Gabor Pihaj
parent 2ae1bb82d4
commit 95e2ebdb36
No known key found for this signature in database
GPG key ID: 7BCF5D144C6C06E3

View file

@ -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";
};
}