Skip to content

Commit

Permalink
Add version tag to frontend (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
pycui authored Aug 17, 2023
1 parent 6db38fd commit 0523a21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/react_build_push_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
3 changes: 3 additions & 0 deletions client/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./
Expand Down
2 changes: 1 addition & 1 deletion client/web/src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Footer = () => (
<p className='copyright'>
Copyright © 2023 RealChar. All rights reserved. Any AI character&apos;s
statements are fictional and don&apos;t represent actual beliefs or
opinions.
opinions. Ver: {process.env.REACT_APP_BUILD_NUMBER}
</p>
</footer>
);
Expand Down

0 comments on commit 0523a21

Please sign in to comment.