mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-02 22:25:44 +00:00
Add version tags to Docker image & display on frontend
This commit is contained in:
@@ -39,7 +39,10 @@ jobs:
|
|||||||
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
||||||
load: true
|
load: true
|
||||||
context: backend
|
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
|
- name: ⏻ Spawn backend container and dependencies
|
||||||
run: |
|
run: |
|
||||||
docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
|
docker compose -f .github/resources/docker-compose.be-test.yml up --wait --quiet-pull
|
||||||
@@ -58,9 +61,10 @@ jobs:
|
|||||||
context: backend
|
context: backend
|
||||||
tags: |
|
tags: |
|
||||||
infisical/backend:${{ steps.commit.outputs.short }}
|
infisical/backend:${{ steps.commit.outputs.short }}
|
||||||
infisical/backend:latest
|
|
||||||
infisical/backend:${{ steps.extract_version.outputs.version }}
|
infisical/backend:${{ steps.extract_version.outputs.version }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
labels: |
|
||||||
|
version=${{ steps.extract_version.outputs.version }}
|
||||||
|
|
||||||
frontend-image:
|
frontend-image:
|
||||||
name: Build frontend image
|
name: Build frontend image
|
||||||
@@ -90,9 +94,22 @@ jobs:
|
|||||||
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
|
||||||
project: 64mmf0n610
|
project: 64mmf0n610
|
||||||
context: frontend
|
context: frontend
|
||||||
tags: infisical/frontend:test
|
tags: |
|
||||||
|
infisical/frontend:${{ steps.extract_version.outputs.version }}
|
||||||
build-args: |
|
build-args: |
|
||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
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
|
- name: ⏻ Spawn frontend container
|
||||||
run: |
|
run: |
|
||||||
docker run -d --rm --name infisical-frontend-test infisical/frontend:test
|
docker run -d --rm --name infisical-frontend-test infisical/frontend:test
|
||||||
@@ -111,8 +128,9 @@ jobs:
|
|||||||
context: frontend
|
context: frontend
|
||||||
tags: |
|
tags: |
|
||||||
infisical/frontend:${{ steps.commit.outputs.short }}
|
infisical/frontend:${{ steps.commit.outputs.short }}
|
||||||
infisical/frontend:latest
|
|
||||||
infisical/frontend:${{ steps.extract_version.outputs.version }}
|
infisical/frontend:${{ steps.extract_version.outputs.version }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
build-args: |
|
build-args: |
|
||||||
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
|
||||||
|
labels: |
|
||||||
|
version=${{ steps.extract_version.outputs.version }}
|
||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
faCheck,
|
faCheck,
|
||||||
faEnvelope,
|
faEnvelope,
|
||||||
faInfinity,
|
faInfinity,
|
||||||
|
faInfo,
|
||||||
faMobile,
|
faMobile,
|
||||||
faPlus,
|
faPlus,
|
||||||
faQuestion
|
faQuestion
|
||||||
@@ -68,6 +69,7 @@ import {
|
|||||||
useLogoutUser,
|
useLogoutUser,
|
||||||
useUploadWsKey
|
useUploadWsKey
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
|
import { CURRENT_INFISICAL_VERSION } from "@app/version"
|
||||||
|
|
||||||
interface LayoutProps {
|
interface LayoutProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@@ -696,6 +698,10 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</button>
|
</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>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
export const CURRENT_INFISICAL_VERSION = "v1.1.1"; // placeholder - dynamically updated on prod build
|
||||||
Reference in New Issue
Block a user