Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
5234c1da89
commit
0d744623ce
@ -1,4 +1,4 @@
|
|||||||
use std::path::PathBuf;
|
use std::{path::PathBuf, time::UNIX_EPOCH};
|
||||||
|
|
||||||
const DRONE_TEMPLATER_IMAGE: &str = "kasperhermansen/drone-templater:main-1711805042";
|
const DRONE_TEMPLATER_IMAGE: &str = "kasperhermansen/drone-templater:main-1711805042";
|
||||||
|
|
||||||
@ -32,9 +32,14 @@ impl MainAction for DroneTemplater {
|
|||||||
|
|
||||||
let drone_token_secret = self.client.set_secret("DRONE_TOKEN", drone_token);
|
let drone_token_secret = self.client.set_secret("DRONE_TOKEN", drone_token);
|
||||||
|
|
||||||
|
let now = std::time::SystemTime::now()
|
||||||
|
.duration_since(UNIX_EPOCH)
|
||||||
|
.context("failed to get system time")?;
|
||||||
|
|
||||||
self.client
|
self.client
|
||||||
.container()
|
.container()
|
||||||
.from(DRONE_TEMPLATER_IMAGE)
|
.from(DRONE_TEMPLATER_IMAGE)
|
||||||
|
.with_exec(vec!["echo", &format!("{}", now.as_secs())])
|
||||||
.with_directory("/src/templates", src)
|
.with_directory("/src/templates", src)
|
||||||
.with_workdir("/src")
|
.with_workdir("/src")
|
||||||
.with_env_variable("DRONE_HOST", drone_host)
|
.with_env_variable("DRONE_HOST", drone_host)
|
||||||
|
Loading…
Reference in New Issue
Block a user