diff --git a/.github/workflows/react_build_push_deploy.yaml b/.github/workflows/react_build_push_deploy.yaml index 610787b98..edbb24d5b 100644 --- a/.github/workflows/react_build_push_deploy.yaml +++ b/.github/workflows/react_build_push_deploy.yaml @@ -28,6 +28,7 @@ jobs: file: ./client/web/Dockerfile push: true tags: shaunly/real_char_frontend:latest + build-args: REACT_APP_BUILD_NUMBER=${{ github.ref }} - name: Deploy to Kubernetes if: ${{ contains(github.ref, 'deploy') }} diff --git a/client/web/Dockerfile b/client/web/Dockerfile index 1aaebd810..8dc189f0b 100644 --- a/client/web/Dockerfile +++ b/client/web/Dockerfile @@ -4,6 +4,9 @@ FROM node:alpine as build # Working directory be app WORKDIR /app +ARG REACT_APP_BUILD_NUMBER +ENV REACT_APP_BUILD_NUMBER $REACT_APP_BUILD_NUMBER + # Copy package.json and package-lock.json before other files # Utilise Docker cache to save re-installing dependencies if unchanged COPY package.json ./ diff --git a/client/web/src/components/Footer/index.jsx b/client/web/src/components/Footer/index.jsx index 5d119366b..f698b302e 100644 --- a/client/web/src/components/Footer/index.jsx +++ b/client/web/src/components/Footer/index.jsx @@ -40,7 +40,7 @@ const Footer = () => (
Copyright © 2023 RealChar. All rights reserved. Any AI character's statements are fictional and don't represent actual beliefs or - opinions. + opinions. Ver: {process.env.REACT_APP_BUILD_NUMBER}
);