Skip to content

Commit

Permalink
Test release workflow passing tag to docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Jun 29, 2024
1 parent 42ea478 commit 66bb717
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ 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_ENV
else
echo "tag=${{ github.event.workflow_run.conclusion.outputs.version }}" >> $GITHUB_ENV
fi
echo "::set-output name=value::$INPUT_VALUE"
outputs:
tag: ${{ env.tag }}
- name: Build and push
uses: docker/build-push-action@v3
with:
Expand All @@ -47,7 +49,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
Expand All @@ -60,7 +62,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
Expand All @@ -73,6 +75,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
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tafrigh"
version = "1.4.4"
version = "1.4.5"
description = "تفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai."
authors = ["EasyBooks <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 66bb717

Please sign in to comment.