Skip to content

Commit

Permalink
Fix action detect
Browse files Browse the repository at this point in the history
  • Loading branch information
drakeerv committed Sep 30, 2024
1 parent 5bd30e3 commit 36f04f0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pasted"
version = "1.2.21"
version = "1.2.22"
edition = "2021"
authors = ["drakeerv <drakeerv@outlook.com>"]
description = "A pastebin frontend written in Rust"
Expand Down
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 2 additions & 2 deletions src/routes/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions templates/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ <h2>Instance Info</h2>
<td>{{ commit }}</td>
</tr>
<tr>
<td>Used Github Actions</td>
<td>{{ used_actions }}</td>
<td>Github Action Name</td>
<td>{{ action_name }}</td>
</tr>
<tr>
<td>Build Date</td>
Expand Down

0 comments on commit 36f04f0

Please sign in to comment.