Skip to content

Commit

Permalink
Dynamically set Khoj app version in the Dockerization Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
debanjum committed Dec 21, 2023
1 parent 83fe0b2 commit 4bdcec8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/dockerize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
username: ${{ github.repository_owner }}
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
uses: docker/build-push-action@v2
with:
Expand All @@ -45,4 +49,5 @@ jobs:
push: true
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
build-args: |
VERSION=${{ steps.hatch.outputs.version }}
PORT=42110
5 changes: 5 additions & 0 deletions .github/workflows/dockerize_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
username: ${{ github.repository_owner }}
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
uses: docker/build-push-action@v2
with:
Expand All @@ -49,4 +53,5 @@ jobs:
push: true
tags: ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}
build-args: |
VERSION=${{ steps.hatch.outputs.version }}
PORT=42110

0 comments on commit 4bdcec8

Please sign in to comment.