diff --git a/.github/workflows/dockerize.yml b/.github/workflows/dockerize.yml index 70098040..e0e63ccd 100644 --- a/.github/workflows/dockerize.yml +++ b/.github/workflows/dockerize.yml @@ -36,6 +36,10 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.PAT }} + - name: Get App Version + id: hatch + run: echo "version=$(pipx run hatch version)" >> $GITHUB_OUTPUT + - name: 📦 Build and Push Docker Image uses: docker/build-push-action@v2 with: @@ -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 diff --git a/.github/workflows/dockerize_production.yml b/.github/workflows/dockerize_production.yml index c4ed963e..a0b86981 100644 --- a/.github/workflows/dockerize_production.yml +++ b/.github/workflows/dockerize_production.yml @@ -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: @@ -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