diff --git a/Cargo.lock b/Cargo.lock index 2041e69..3ed87e2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1065,7 +1065,7 @@ dependencies = [ [[package]] name = "pasted" -version = "1.2.21" +version = "1.2.22" dependencies = [ "axum", "byte-unit", diff --git a/Cargo.toml b/Cargo.toml index 1d66e5e..5c49197 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pasted" -version = "1.2.21" +version = "1.2.22" edition = "2021" authors = ["drakeerv "] description = "A pastebin frontend written in Rust" diff --git a/build.rs b/build.rs index 01985f1..b90254c 100644 --- a/build.rs +++ b/build.rs @@ -3,6 +3,6 @@ use chrono::Local; fn main() { let build_time = Local::now().to_rfc2822(); println!("cargo:rustc-env=BUILD_DATE={}", build_time); - let used_actions = std::env::var("GITHUB_ACTIONS").unwrap_or_default() == "true"; - println!("cargo:rustc-env=USED_ACTIONS={}", used_actions); + let action_name = std::env::var("GITHUB_ACTIONS").unwrap_or("Actions not detected".to_string()); + println!("cargo:rustc-env=ACTION_NAME={}", action_name); } \ No newline at end of file diff --git a/src/routes/info.rs b/src/routes/info.rs index d7fe34e..a0162f2 100644 --- a/src/routes/info.rs +++ b/src/routes/info.rs @@ -19,7 +19,7 @@ struct InstanceInfo { is_release: bool, db_size: u64, commit: &'static str, - used_actions: bool, + action_name: &'static str, build_date: &'static str, deploy_date: &'static str, static_templates: bool, @@ -42,7 +42,7 @@ fn get_info(state: AppState) -> InstanceInfo { name: env!("CARGO_PKG_NAME"), is_release: !cfg!(debug_assertions), db_size: state.db.size_on_disk().unwrap(), - used_actions: std::env::var("USED_ACTIONS").unwrap_or_default() == "true", + action_name: env!("ACTION_NAME"), commit, build_date, deploy_date, diff --git a/templates/info.html b/templates/info.html index f0407e5..869bd72 100644 --- a/templates/info.html +++ b/templates/info.html @@ -44,8 +44,8 @@

Instance Info

{{ commit }} - Used Github Actions - {{ used_actions }} + Github Action Name + {{ action_name }} Build Date