mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Dynamically set Khoj app version in the Dockerization Github workflows
This commit is contained in:
parent
d3d47dce0b
commit
b5ae64cb3c
2 changed files with 10 additions and 0 deletions
5
.github/workflows/dockerize.yml
vendored
5
.github/workflows/dockerize.yml
vendored
|
@ -36,6 +36,10 @@ jobs:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.PAT }}
|
password: ${{ secrets.PAT }}
|
||||||
|
|
||||||
|
- name: Get App Version
|
||||||
|
id: hatch
|
||||||
|
run: echo "version=$(pipx run hatch version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: 📦 Build and Push Docker Image
|
- name: 📦 Build and Push Docker Image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -45,4 +49,5 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
|
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
|
||||||
build-args: |
|
build-args: |
|
||||||
|
VERSION=${{ steps.hatch.outputs.version }}
|
||||||
PORT=42110
|
PORT=42110
|
||||||
|
|
5
.github/workflows/dockerize_production.yml
vendored
5
.github/workflows/dockerize_production.yml
vendored
|
@ -40,6 +40,10 @@ jobs:
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.PAT }}
|
password: ${{ secrets.PAT }}
|
||||||
|
|
||||||
|
- name: Get App Version
|
||||||
|
id: hatch
|
||||||
|
run: echo "::set-output name=version::$(pipx run hatch version)"
|
||||||
|
|
||||||
- name: 📦 Build and Push Docker Image
|
- name: 📦 Build and Push Docker Image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -49,4 +53,5 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}
|
tags: ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}
|
||||||
build-args: |
|
build-args: |
|
||||||
|
VERSION=${{ steps.hatch.outputs.version }}
|
||||||
PORT=42110
|
PORT=42110
|
||||||
|
|
Loading…
Add table
Reference in a new issue