feat: update components on prs to also build release
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-05-25 23:10:11 +02:00
parent 65735ba15a
commit 4bd6032c05
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394

View File

@ -327,9 +327,23 @@ impl RustService {
#[async_trait] #[async_trait]
impl PullRequestAction for RustService { impl PullRequestAction for RustService {
async fn execute_pull_request(&self, _ctx: &mut Context) -> eyre::Result<()> { async fn execute_pull_request(&self, ctx: &mut Context) -> eyre::Result<()> {
self.build_test().await?; self.build_test().await?;
let container = self.build_release().await?.pipeline("pr");
let timestamp = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
.as_secs();
let tag = format!(
"docker.io/kasperhermansen/{}:dev-{}",
self.bin_name, timestamp,
);
container.publish(&tag).await?;
ctx.set_image_tag(format!("dev-{}", &timestamp.to_string()))?;
Ok(()) Ok(())
} }
} }