Skip to content

Commit

Permalink
Test release workflow passing tag to docker workflow fourth (And hope…
Browse files Browse the repository at this point in the history
…fully last) trial
  • Loading branch information
AliOsm committed Jun 29, 2024
1 parent ffe3608 commit 28f1417
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
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.7"
version = "1.4.8"
description = "تفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai."
authors = ["EasyBooks <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 28f1417

Please sign in to comment.