mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-10 07:58:15 -05:00
Add version tags to Docker image & display on frontend
This commit is contained in:
26
.github/workflows/build-docker-image-to-prod.yml
vendored
26
.github/workflows/build-docker-image-to-prod.yml
vendored
@@ -39,7 +39,10 @@ jobs:
|
||||
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
||||
load: true
|
||||
context: backend
|
||||
tags: infisical/backend:test
|
||||
tags: |
|
||||
infisical/backend:${{ steps.extract_version.outputs.version }}
|
||||
labels: |
|
||||
version=${{ steps.extract_version.outputs.version }}
|
||||
- name: ⏻ Spawn backend container and dependencies
|
||||
run: |
|
||||
docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
|
||||
@@ -58,9 +61,10 @@ jobs:
|
||||
context: backend
|
||||
tags: |
|
||||
infisical/backend:${{ steps.commit.outputs.short }}
|
||||
infisical/backend:latest
|
||||
infisical/backend:${{ steps.extract_version.outputs.version }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
labels: |
|
||||
version=${{ steps.extract_version.outputs.version }}
|
||||
|
||||
frontend-image:
|
||||
name: Build frontend image
|
||||
@@ -90,9 +94,22 @@ jobs:
|
||||
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
||||
project: 64mmf0n610
|
||||
context: frontend
|
||||
tags: infisical/frontend:test
|
||||
tags: |
|
||||
infisical/frontend:${{ steps.extract_version.outputs.version }}
|
||||
build-args: |
|
||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||
labels: |
|
||||
version=${{ steps.extract_version.outputs.version }}
|
||||
- name: 🛠️ Create or update Infisical version in version.ts file
|
||||
run: |
|
||||
version='${{ steps.extract_version.outputs.version }}'
|
||||
file='frontend/src/version.ts'
|
||||
touch "$file"
|
||||
if grep -q "export const CURRENT_INFISICAL_VERSION = '.*';" "$file"; then
|
||||
sed -i "s/export const CURRENT_INFISICAL_VERSION = '.*';/export const CURRENT_INFISICAL_VERSION = '$version';/" "$file"
|
||||
else
|
||||
echo "export const INFISICAL_VERSION = '$version';" >> "$file"
|
||||
fi
|
||||
- name: ⏻ Spawn frontend container
|
||||
run: |
|
||||
docker run -d --rm --name infisical-frontend-test infisical/frontend:test
|
||||
@@ -111,8 +128,9 @@ jobs:
|
||||
context: frontend
|
||||
tags: |
|
||||
infisical/frontend:${{ steps.commit.outputs.short }}
|
||||
infisical/frontend:latest
|
||||
infisical/frontend:${{ steps.extract_version.outputs.version }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: |
|
||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||
labels: |
|
||||
version=${{ steps.extract_version.outputs.version }}
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
faCheck,
|
||||
faEnvelope,
|
||||
faInfinity,
|
||||
faInfo,
|
||||
faMobile,
|
||||
faPlus,
|
||||
faQuestion
|
||||
@@ -68,6 +69,7 @@ import {
|
||||
useLogoutUser,
|
||||
useUploadWsKey
|
||||
} from "@app/hooks/api";
|
||||
import { CURRENT_INFISICAL_VERSION } from "@app/version"
|
||||
|
||||
interface LayoutProps {
|
||||
children: React.ReactNode;
|
||||
@@ -696,6 +698,10 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
||||
</div>
|
||||
</button>
|
||||
)}
|
||||
<div className="mb-2 w-full pl-5 duration-200 hover:text-mineshaft-200">
|
||||
<FontAwesomeIcon icon={faInfo} className="mr-4 px-[0.1rem]" />
|
||||
Current version: {CURRENT_INFISICAL_VERSION}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</aside>
|
||||
|
||||
1
frontend/src/version.ts
Normal file
1
frontend/src/version.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const CURRENT_INFISICAL_VERSION = "v1.1.1"; // placeholder - dynamically updated on prod build
|
||||
Reference in New Issue
Block a user