Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
1b5ee9b7e3
commit
e67c4baa97
@ -120,7 +120,7 @@ mod please_release {
|
||||
cuddle_image: args
|
||||
.cuddle_please_image
|
||||
.clone()
|
||||
.unwrap_or("kasperhermansen/cuddle-please:main-1691504183".into()),
|
||||
.unwrap_or("kasperhermansen/cuddle-please:latest".into()),
|
||||
server: dagger_cuddle_please::models::SrcServer::Gitea {
|
||||
token: std::env::var("CUDDLE_PLEASE_TOKEN")
|
||||
.expect("CUDDLE_PLEASE_TOKEN to be present"),
|
||||
|
38
crates/cuddle-ci/src/cuddle_please.rs
Normal file
38
crates/cuddle-ci/src/cuddle_please.rs
Normal file
@ -0,0 +1,38 @@
|
||||
use async_trait::async_trait;
|
||||
use dagger_cuddle_please::{
|
||||
models::CuddlePleaseSrcArgs, DaggerCuddlePlease, DaggerCuddlePleaseAction,
|
||||
};
|
||||
|
||||
use crate::{MainAction, PullRequestAction};
|
||||
|
||||
pub struct CuddlePlease {
|
||||
client: dagger_sdk::Query,
|
||||
}
|
||||
|
||||
impl CuddlePlease {
|
||||
pub fn new(client: dagger_sdk::Query) -> Self {
|
||||
Self { client }
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl MainAction for CuddlePlease {
|
||||
async fn execute_main(&self) -> eyre::Result<()> {
|
||||
let client = self.client.clone();
|
||||
|
||||
let action = DaggerCuddlePlease::new(client);
|
||||
|
||||
action
|
||||
.cuddle_please_src(&CuddlePleaseSrcArgs {
|
||||
cuddle_image: "kasperhermansen/cuddle-please:main-1691504183".into(),
|
||||
server: dagger_cuddle_please::models::SrcServer::Gitea {
|
||||
token: std::env::var("CUDDLE_PLEASE_TOKEN")
|
||||
.expect("CUDDLE_PLEASE_TOKEN to be present"),
|
||||
},
|
||||
log_level: Some(dagger_cuddle_please::models::LogLevel::Debug),
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
@ -2,47 +2,8 @@ pub mod cli;
|
||||
pub mod leptos_service;
|
||||
pub use cli::*;
|
||||
|
||||
pub mod cuddle_please;
|
||||
pub mod dagger_middleware;
|
||||
pub mod node_service;
|
||||
pub mod rust_lib;
|
||||
pub mod rust_service;
|
||||
pub mod cuddle_please {
|
||||
use async_trait::async_trait;
|
||||
use dagger_cuddle_please::{
|
||||
models::CuddlePleaseSrcArgs, DaggerCuddlePlease, DaggerCuddlePleaseAction,
|
||||
};
|
||||
|
||||
use crate::{MainAction, PullRequestAction};
|
||||
|
||||
pub struct CuddlePlease {
|
||||
client: dagger_sdk::Query,
|
||||
}
|
||||
|
||||
impl CuddlePlease {
|
||||
pub fn new(client: dagger_sdk::Query) -> Self {
|
||||
Self { client }
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl MainAction for CuddlePlease {
|
||||
async fn execute_main(&self) -> eyre::Result<()> {
|
||||
let client = self.client.clone();
|
||||
|
||||
let action = DaggerCuddlePlease::new(client);
|
||||
|
||||
action
|
||||
.cuddle_please_src(&CuddlePleaseSrcArgs {
|
||||
cuddle_image: "kasperhermansen/cuddle-please:latest".into(),
|
||||
server: dagger_cuddle_please::models::SrcServer::Gitea {
|
||||
token: std::env::var("CUDDLE_PLEASE_TOKEN")
|
||||
.expect("CUDDLE_PLEASE_TOKEN to be present"),
|
||||
},
|
||||
log_level: Some(dagger_cuddle_please::models::LogLevel::Debug),
|
||||
})
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user