diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index c5d5938..4063b92 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -15,6 +15,7 @@ on: jobs: build-and-push-image: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} permissions: contents: read packages: write @@ -31,13 +32,22 @@ 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=${{ github.event.workflow_run.conclusion.outputs.version }}" >> "$GITHUB_OUTPUT" + echo "tag=${{ env.version }}" >> "$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 8fe8313..890b8a9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,4 +18,9 @@ jobs: - 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 + run: echo "version=${{ github.event.release.tag_name }}" >> version.txt + - name: Upload version artifact + uses: actions/upload-artifact@v3 + with: + name: version + path: version.txt diff --git a/pyproject.toml b/pyproject.toml index b7023b9..f180813 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tafrigh" -version = "1.4.6" +version = "1.4.7" description = "تفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai." authors = ["EasyBooks "] license = "MIT"