Skip to content

Commit

Permalink
pass project version through for latest
Browse files Browse the repository at this point in the history
  • Loading branch information
CindyvdVries committed Jun 25, 2024
1 parent 5442519 commit 4d206fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 4d206fc

Please sign in to comment.