diff --git a/.github/workflows/build_publish_container_images.yml b/.github/workflows/build_publish_container_images.yml index 3b7539a1..1300bf67 100644 --- a/.github/workflows/build_publish_container_images.yml +++ b/.github/workflows/build_publish_container_images.yml @@ -23,7 +23,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -32,8 +31,9 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-args: FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} - + build-args: | + FONTAWESOME_NPM_AUTH_TOKEN=${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} + NEXT_PUBLIC_VERSION=${{ github.event.release.tag_name }} chase-backend: runs-on: ubuntu-latest @@ -53,7 +53,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -81,7 +80,6 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push Docker image uses: docker/build-push-action@v5 with: @@ -89,4 +87,4 @@ jobs: file: ./Dockerfile.chase.backend.db-migration push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile.chase.frontend b/Dockerfile.chase.frontend index 59caca4a..e2f46c2e 100644 --- a/Dockerfile.chase.frontend +++ b/Dockerfile.chase.frontend @@ -31,8 +31,10 @@ COPY --from=nextjs /app/staging/node_modules ./node_modules/ COPY --from=builder /app/staging/chase/frontend/public ./public/ COPY --from=builder /app/staging/chase/frontend/.next/standalone ./ COPY --from=builder /app/staging/chase/frontend/.next/static ./.next/static +ARG NEXT_PUBLIC_VERSION ENV NODE_ENV=production ENV PORT=3000 +ENV NEXT_PUBLIC_VERSION=${NEXT_PUBLIC_VERSION} # run the app USER bun EXPOSE 3000/tcp diff --git a/bun.lockb b/bun.lockb index 983da363..06c25cd5 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/chase/frontend/.env.development b/chase/frontend/.env.development index 24db7bc0..d34715b7 100644 --- a/chase/frontend/.env.development +++ b/chase/frontend/.env.development @@ -1 +1,2 @@ -NEXT_PUBLIC_BACKEND_URL=http://localhost:3001 \ No newline at end of file +NEXT_PUBLIC_BACKEND_URL=http://localhost:3001 +NEXT_PUBLIC_VERSION=1.1.10 \ No newline at end of file diff --git a/chase/frontend/app/page.tsx b/chase/frontend/app/page.tsx index d121718d..343eca98 100644 --- a/chase/frontend/app/page.tsx +++ b/chase/frontend/app/page.tsx @@ -1,18 +1,26 @@ "use client"; -import React from "react"; +import React, { useState } from "react"; import { useI18nContext } from "@/i18n/i18n-react"; import Navbar from "@/components/home/navbar"; import LandingHero from "@/components/home/landing_hero"; import CardSection from "@/components/home/card_section"; import TextSection from "@/components/home/text_section"; -import { faCodeBranch, faExternalLink } from "@fortawesome/pro-solid-svg-icons"; +import { + faCodeBranch, + faCodeCommit, + faExternalLink, + faStars, +} from "@fortawesome/pro-solid-svg-icons"; import Footer from "@/components/home/footer"; import { useMediaQuery } from "react-responsive"; import Image from "next/image"; +import VersionModal from "@/components/version_modal"; export default function Home() { const { LL } = useI18nContext(); + const [versionModalVisible, setVersionModalVisible] = useState(false); + const _isDesktopOrLaptop = useMediaQuery({ query: "(min-width: 1024px)", }); @@ -48,6 +56,11 @@ export default function Home() { setVersionModalVisible(true), + faIcon: faStars, + }} />