From a27b81a8a74f0a138a4c6dc94983d2ae9205165b Mon Sep 17 00:00:00 2001 From: Ali Hamdi Ali Fadel Date: Sat, 29 Jun 2024 21:42:07 +0300 Subject: [PATCH] Test release workflow passing tag to docker workflow --- .github/workflows/docker-publish.yml | 14 +++++++------- .github/workflows/release.yml | 2 ++ pyproject.toml | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index ef3dd33..c5d5938 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -34,11 +34,11 @@ jobs: - name: Determine version tag id: version-tag run: | - INPUT_VALUE="${{ github.event.inputs.tagInput }}" - if [ -z "$INPUT_VALUE" ]; then - INPUT_VALUE="${{ github.ref_name }}" + if [ -n "${{ github.event.inputs.tagInput }}" ]; then + echo "tag=${{ github.event.inputs.tagInput }}" >> "$GITHUB_OUTPUT" + else + echo "tag=${{ github.event.workflow_run.conclusion.outputs.version }}" >> "$GITHUB_OUTPUT" fi - echo "::set-output name=value::$INPUT_VALUE" - name: Build and push uses: docker/build-push-action@v3 with: @@ -47,7 +47,7 @@ jobs: push: true tags: | ghcr.io/ieasybooks/tafrigh:latest - ghcr.io/ieasybooks/tafrigh:${{ steps.version-tag.outputs.value }} + ghcr.io/ieasybooks/tafrigh:${{ steps.version-tag.outputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max - name: Build and push Wit image @@ -60,7 +60,7 @@ jobs: push: true tags: | ghcr.io/ieasybooks/tafrigh-wit:latest - ghcr.io/ieasybooks/tafrigh-wit:${{ steps.version-tag.outputs.value }} + ghcr.io/ieasybooks/tafrigh-wit:${{ steps.version-tag.outputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max - name: Build and push Whisper image @@ -73,6 +73,6 @@ jobs: push: true tags: | ghcr.io/ieasybooks/tafrigh-whisper:latest - ghcr.io/ieasybooks/tafrigh-whisper:${{ steps.version-tag.outputs.value }} + ghcr.io/ieasybooks/tafrigh-whisper:${{ steps.version-tag.outputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91dfa74..8fe8313 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,3 +17,5 @@ jobs: python-version: 3.12 - run: python -m pip install build twine && python -m build - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Set output version + run: echo "version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT diff --git a/pyproject.toml b/pyproject.toml index 7e6184f..15fd5dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tafrigh" -version = "1.4.4" +version = "1.4.5" description = "تفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai." authors = ["EasyBooks "] license = "MIT"