version fix
This commit is contained in:
1 parent
8606b5e5de
commit
b03f951352
4 files changed
+26
-7
No files matched your search
@@ -18,12 +18,16 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
id: vars
|
||||||
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
- name: Build Client Docker image
|
- name: Build Client Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
-t ghcr.io/bluewave-labs/checkmate-client:latest \
|
-t ghcr.io/bluewave-labs/checkmate-client:latest \
|
||||||
-f ./docker/dist/client.Dockerfile \
|
-f ./docker/dist/client.Dockerfile \
|
||||||
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
||||||
|
--build-arg VITE_APP_VERSION=${{ env.VERSION }} \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Push Client Docker image
|
- name: Push Client Docker image
|
||||||
@@ -96,6 +100,10 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
id: vars
|
||||||
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Build and push multi-arch Docker image
|
- name: Build and push multi-arch Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
@@ -107,6 +115,8 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate
|
org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate
|
||||||
|
build-args: |
|
||||||
|
VITE_APP_VERSION=${{ env.VERSION }}
|
||||||
|
|
||||||
docker-build-and-push-server-mono:
|
docker-build-and-push-server-mono:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -18,12 +18,16 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
id: vars
|
||||||
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
- name: Build Client Docker image
|
- name: Build Client Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
-t ghcr.io/bluewave-labs/checkmate:frontend-demo \
|
-t ghcr.io/bluewave-labs/checkmate:frontend-demo \
|
||||||
-f ./docker/prod/client.Dockerfile \
|
-f ./docker/prod/client.Dockerfile \
|
||||||
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
||||||
|
--build-arg VITE_APP_VERSION=${{ env.VERSION }} \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Push Client Docker image
|
- name: Push Client Docker image
|
||||||
|
|||||||
@@ -18,12 +18,16 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get version
|
||||||
|
id: vars
|
||||||
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
||||||
- name: Build Client Docker image
|
- name: Build Client Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
-t ghcr.io/bluewave-labs/checkmate:frontend-staging \
|
-t ghcr.io/bluewave-labs/checkmate:frontend-staging \
|
||||||
-f ./docker/staging/client.Dockerfile \
|
-f ./docker/staging/client.Dockerfile \
|
||||||
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
||||||
|
--build-arg VITE_APP_VERSION=${{ env.VERSION }} \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Push Client Docker image
|
- name: Push Client Docker image
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ import { execSync } from "child_process";
|
|||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
const env = loadEnv(mode, process.cwd(), "");
|
const env = loadEnv(mode, process.cwd(), "");
|
||||||
let version;
|
let version = env.VITE_APP_VERSION;
|
||||||
try {
|
|
||||||
version =
|
if (!version) {
|
||||||
env.VITE_APP_VERSION ||
|
try {
|
||||||
execSync("git describe --tags --abbrev=0").toString().trim();
|
version = execSync("git describe --tags --abbrev=0").toString().trim();
|
||||||
} catch (error) {
|
} catch {
|
||||||
version = "unknown";
|
version = "unknown";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in new issue
Block a user