From 4d206fc8b05143e168504e7800c158a9b3b8d10d Mon Sep 17 00:00:00 2001 From: CindyvdVries Date: Tue, 25 Jun 2024 11:03:32 +0200 Subject: [PATCH] pass project version through for latest --- .github/workflows/docker_image.yml | 10 +++++++++- .github/workflows/release.yml | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml index e418ddc4..7a9d3f63 100644 --- a/.github/workflows/docker_image.yml +++ b/.github/workflows/docker_image.yml @@ -6,11 +6,18 @@ name: "Publish to GHCR" -on: [workflow_call, workflow_dispatch] +on: + workflow_call: + inputs: + project_version: + required: true + type: string + workflow_dispatch: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} + PROJECT_VERSION: ${{ inputs.project_version }} || false jobs: build: @@ -35,6 +42,7 @@ jobs: with: poetry-version: 1.4.2 - name: Get current version + if: ${{ env.PROJECT_VERSION }} run: | PROJECT_VERSION=$(poetry version --short) echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cb2c912..d9d6e58c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,3 +45,5 @@ jobs: docker-build: needs: bump-up-version uses: ./.github/workflows/docker_image.yml + with: + project_version: ${{ needs.bump-up-version.outputs.project_version }}