podman
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2025-05-16 08:57:12 +02:00
parent 457b6fa8ba
commit c4feb418ce
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -217,12 +217,18 @@ pub fn build(image: &str, ci: bool) {
"bash", "-c", &cmd,
]);
Command::new("docker")
let cmd = if is_podman_installed() {
"podman"
} else {
"docker"
};
Command::new(cmd)
.stderr(Stdio::inherit())
.stdout(Stdio::inherit())
.args(args)
.status()
.expect("Failed to start Docker")
.expect("Failed to start Docker or podman")
};
if !status.success() {
@ -254,6 +260,14 @@ pub fn find_package_files() -> Vec<String> {
.collect()
}
fn is_podman_installed() -> bool {
Command::new("podman")
.arg("--version")
.output()
.map(|output| output.status.success())
.unwrap_or(false)
}
pub fn pacco_push(package: &str, repo: &str, signed: bool) {
let pacco_domain = std::env::var("PACCO_HOST").unwrap();
let pkg = package;