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 }}