Added version number
All checks were successful
Build and Push Image / build-and-push (push) Successful in 7m31s
All checks were successful
Build and Push Image / build-and-push (push) Successful in 7m31s
This commit is contained in:
1
.github/workflows/release.yaml
vendored
1
.github/workflows/release.yaml
vendored
@@ -34,3 +34,4 @@ jobs:
|
||||
context: .
|
||||
push: true
|
||||
tags: git.kaisei.app/amatsugu/aoba:${{ env.VERSION }}
|
||||
build-args: VERSION=${ env.VERSION }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::env;
|
||||
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use crate::{Route, contexts::AuthContext};
|
||||
@@ -47,9 +49,10 @@ pub fn Widgets() -> Element {
|
||||
#[component]
|
||||
pub fn Utils() -> Element {
|
||||
let mut auth_context = use_context::<AuthContext>();
|
||||
|
||||
let version = env::var("APP_VERSION").unwrap_or("DEBUG".into());
|
||||
rsx! {
|
||||
div { class: "utils",
|
||||
div { "{version}" }
|
||||
div { onclick: move |_| auth_context.logout(), "Logout" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ RUN apt install -y protobuf-compiler libprotobuf-dev ffmpeg
|
||||
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
RUN cargo binstall dioxus-cli --root /.cargo -y --force
|
||||
ENV PATH="/.cargo/bin:$PATH"
|
||||
|
||||
ARG VERSION
|
||||
ENV APP_VERSION=$VERSION
|
||||
# Create the final bundle folder. Bundle always executes in release mode with optimizations enabled
|
||||
RUN dx bundle --platform web
|
||||
|
||||
@@ -56,7 +57,7 @@ RUN dotnet publish "./AobaServer.csproj" -c $BUILD_CONFIGURATION -o /app/publish
|
||||
# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=publish /app/publish .
|
||||
COPY --from=client-builder /bin/ffmpeg /bin/ffprobe /bin/ffplay /usr/bin/
|
||||
|
||||
ENTRYPOINT ["dotnet", "AobaServer.dll"]
|
||||
|
||||
Reference in New Issue
Block a user