Add version sync to __init__.py in Docker workflows

This commit is contained in:
yangdx 2025-09-05 10:56:46 +08:00
parent d85ff5b9d7
commit 9181649bae
2 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,12 @@ jobs:
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
echo "image_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Update version in __init__.py
run: |
sed -i "s/__version__ = \".*\"/__version__ = \"${{ steps.get_tag.outputs.tag }}\"/" lightrag/__init__.py
echo "Updated __init__.py with version ${{ steps.get_tag.outputs.tag }}"
cat lightrag/__init__.py | grep __version__
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

View file

@ -35,6 +35,12 @@ jobs:
echo "Found tag: $TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Update version in __init__.py
run: |
sed -i "s/__version__ = \".*\"/__version__ = \"${{ steps.get_tag.outputs.tag }}\"/" lightrag/__init__.py
echo "Updated __init__.py with version ${{ steps.get_tag.outputs.tag }}"
cat lightrag/__init__.py | grep __version__
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5