From 28f141762fa85b362fe9331ffad4af7a91cf5f88 Mon Sep 17 00:00:00 2001 From: Ali Hamdi Ali Fadel Date: Sat, 29 Jun 2024 23:29:47 +0300 Subject: [PATCH] Test release workflow passing tag to docker workflow fourth (And hopefully last) trial --- .github/workflows/docker-publish.yml | 20 ++++++-------------- .github/workflows/release.yml | 8 ++------ pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 4063b92..ce20576 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -7,10 +7,11 @@ on: description: 'Tag' required: true - workflow_run: - workflows: [Release Package to PyPI.org] - types: - - completed + workflow_call: + inputs: + tag: + required: true + type: string jobs: build-and-push-image: @@ -32,22 +33,13 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GH_TOKEN }} - - name: Download version artifact - uses: actions/download-artifact@v3 - with: - name: version - - name: Read version - id: read-version - run: | - version=$(cat version.txt) - echo "version=$version" >> $GITHUB_ENV - name: Determine version tag id: version-tag run: | if [ -n "${{ github.event.inputs.tagInput }}" ]; then echo "tag=${{ github.event.inputs.tagInput }}" >> "$GITHUB_OUTPUT" else - echo "tag=${{ env.version }}" >> "$GITHUB_OUTPUT" + echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT" fi - name: Build and push uses: docker/build-push-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 890b8a9..747d464 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,10 +17,6 @@ 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 }}" >> version.txt - - name: Upload version artifact - uses: actions/upload-artifact@v3 + - uses: ./.github/workflows/docker-publish.yml@main with: - name: version - path: version.txt + tag: ${{ github.ref_name }} diff --git a/pyproject.toml b/pyproject.toml index f180813..1102e89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tafrigh" -version = "1.4.7" +version = "1.4.8" description = "تفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai." authors = ["EasyBooks "] license = "MIT"