Deploy collab like nightly (#7174)

After this change we'll be able to push a tag to github to deploy to
collab.

The advantages of this are that there's no longer a separate step to
first
build the image, and then deploy it.

In the future I'd like to make this happen more automatically (maybe as
part of
bump nightly).

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-01 11:54:49 -07:00 committed by GitHub
parent 5424c8bfd5
commit 7b9d51929d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 188 additions and 115 deletions

View file

@ -14,6 +14,7 @@ use tracing_subscriber::{filter::EnvFilter, fmt::format::JsonFields, Layer};
use util::ResultExt;
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
const REVISION: Option<&'static str> = option_env!("GITHUB_SHA");
#[tokio::main]
async fn main() -> Result<()> {
@ -26,7 +27,7 @@ async fn main() -> Result<()> {
match args().skip(1).next().as_deref() {
Some("version") => {
println!("collab v{VERSION}");
println!("collab v{} ({})", VERSION, REVISION.unwrap_or("unknown"));
}
Some("migrate") => {
run_migrations().await?;
@ -105,7 +106,7 @@ async fn run_migrations() -> Result<()> {
}
async fn handle_root() -> String {
format!("collab v{VERSION}")
format!("collab v{} ({})", VERSION, REVISION.unwrap_or("unknown"))
}
async fn handle_liveness_probe(Extension(state): Extension<Arc<AppState>>) -> Result<String> {