feat: update ci
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-07-26 22:43:05 +02:00
parent c17986182b
commit da0771ccb9
3 changed files with 944 additions and 502 deletions

1429
ci/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ edition = "2021"
[dependencies] [dependencies]
chrono = "0.4.26" chrono = "0.4.26"
color-eyre = "0.6.2" color-eyre = "0.6.2"
dagger-sdk = "0.2.22" dagger-sdk = "0.18.3"
eyre = "0.6.8" eyre = "0.6.8"
tokio = { version = "1.31.0", features = ["full"] } tokio = { version = "1.31.0", features = ["full"] }
tokio-scoped = "0.2.0" tokio-scoped = "0.2.0"

View File

@@ -6,9 +6,9 @@ use tokio::sync::Mutex;
#[tokio::main] #[tokio::main]
async fn main() -> eyre::Result<()> { async fn main() -> eyre::Result<()> {
let _ = dotenv::dotenv(); let _ = dotenv::dotenv();
let client = dagger_sdk::connect().await?; dagger_sdk::connect(|client| async move {
let src = client.host().directory_opts( let src = client.host().directory_opts(
".", ".",
HostDirectoryOptsBuilder::default() HostDirectoryOptsBuilder::default()
.exclude(vec![".git", "node_modules", "public", "ci", "target"]) .exclude(vec![".git", "node_modules", "public", "ci", "target"])
@@ -40,7 +40,7 @@ async fn main() -> eyre::Result<()> {
let pull_articles = client let pull_articles = client
.container() .container()
.from(pull_articles_docker_image) .from(pull_articles_docker_image)
.with_exec(vec!["echo", &format!("{}", tag)]) .with_exec(vec!["echo", &format!("{tag}")])
.with_env_variable("GIT_USERNAME", "kjuulh") .with_env_variable("GIT_USERNAME", "kjuulh")
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap()) .with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
.with_exec(vec![ .with_exec(vec![
@@ -123,11 +123,10 @@ async fn main() -> eyre::Result<()> {
let variants = platform_variants let variants = platform_variants
.lock() .lock()
.await .await
.iter() .iter().cloned()
.map(|c| c.clone())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let version = client client
.container() .container()
.publish_opts( .publish_opts(
format!("kasperhermansen/kasperhermansen-blog:{tag}"), format!("kasperhermansen/kasperhermansen-blog:{tag}"),
@@ -137,7 +136,7 @@ async fn main() -> eyre::Result<()> {
) )
.await?; .await?;
let update_deployment = client client
.container() .container()
.from(update_deployments_docker_image) .from(update_deployments_docker_image)
.with_env_variable("GIT_USERNAME", "kjuulh") .with_env_variable("GIT_USERNAME", "kjuulh")
@@ -154,5 +153,7 @@ async fn main() -> eyre::Result<()> {
.exit_code() .exit_code()
.await?; .await?;
Ok(()) }).await?;
Ok(()) Ok(())
} }