This is an automated email from the ASF dual-hosted git repository.

narro pushed a commit to branch fix-ci
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 8bb16c722a3753e1bad5582659d140883ca4a600
Author: narro wizard <[email protected]>
AuthorDate: Tue Mar 17 09:28:06 2026 +0000

    fix(ci): lock Poetry to version 2.2.1 for Python 3.9 compatibility
    
    Poetry 2.3.x requires Python >= 3.10, but this project uses Python 3.9.
    Lock Poetry to version 2.2.1 (last version compatible with Python 3.9).
    
    Also add PR trigger for Docker builds and fix Docker tag slash issues
    by replacing slashes with dashes in ref_name.
---
 .github/workflows/build.yml | 11 +++++++++--
 backend/Dockerfile          |  3 ++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 34e9f2845..c3361ea16 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,6 +27,11 @@ on:
       - main
       - release-*
       - fix-clear-docker-images-before-build
+  pull_request:
+    paths:
+      - 'backend/Dockerfile'
+      - 'config-ui/Dockerfile'
+      - 'grafana/Dockerfile'
 
 jobs:
   build-and-push-builder:
@@ -186,12 +191,13 @@ jobs:
         id: get_push_tags
         run: |
           image_name=${{ secrets.DOCKERHUB_OWNER }}/devlake
+          ref_name=$(echo "${{ github.ref_name }}" | tr '/' '-')
           if printf ${{ github.ref }} |grep -Pq '^refs/tags/' && printf ${{ 
github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
               echo "TAGS=${image_name}:latest,${image_name}:${{ 
github.ref_name }}" >> $GITHUB_OUTPUT
           elif printf ${{ github.ref }} |grep -Pq '^refs/tags/'; then
               echo "TAGS=${image_name}:${{ github.ref_name }}" >> 
$GITHUB_OUTPUT
           else
-              echo "TAGS=${image_name}:${{ github.ref_name }}_${{ 
needs.get-timestamp.outputs.timestamp }}_${{ 
steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT
+              echo "TAGS=${image_name}:${ref_name}_${{ 
needs.get-timestamp.outputs.timestamp }}_${{ 
steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT
           fi
       - name: Build and push lake image
         uses: docker/build-push-action@v3
@@ -265,12 +271,13 @@ jobs:
         id: get_push_tags
         run: |
           image_name=${{ secrets.DOCKERHUB_OWNER }}/${{ matrix.build.image }}
+          ref_name=$(echo "${{ github.ref_name }}" | tr '/' '-')
           if printf ${{ github.ref }} |grep -Pq '^refs/tags/' && printf ${{ 
github.ref_name }} | grep -Pq '^v(\d+).(\d+).(\d+)$'; then
               echo "TAGS=${image_name}:latest,${image_name}:${{ 
github.ref_name }}" >> $GITHUB_OUTPUT
           elif printf ${{ github.ref }} |grep -Pq '^refs/tags/'; then
               echo "TAGS=${image_name}:${{ github.ref_name }}" >> 
$GITHUB_OUTPUT
           else
-              echo "TAGS=${image_name}:${{ github.ref_name }}_${{ 
needs.get-timestamp.outputs.timestamp }}_${{ 
steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT
+              echo "TAGS=${image_name}:${ref_name}_${{ 
needs.get-timestamp.outputs.timestamp }}_${{ 
steps.get_short_sha.outputs.SHORT_SHA }}" >> $GITHUB_OUTPUT
           fi
       - name: Build and push ${{ matrix.build.name }} image
         uses: docker/build-push-action@v3
diff --git a/backend/Dockerfile b/backend/Dockerfile
index 69cbeca7a..5b03c30d4 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -149,7 +149,8 @@ RUN python3 -m pip install --no-cache --upgrade pip 
setuptools && \
     python3 -m pip install --upgrade pip
 
 # Setup Python Poetry package manager
-RUN curl -sSL https://install.python-poetry.org | python3 -
+# Install Poetry 2.2.1 (last version compatible with Python 3.9)
+RUN curl -sSL https://install.python-poetry.org | python3 - --version 2.2.1
 ENV PATH="$PATH:/app/.local/bin"
 
 # Build Python plugins, make sure the scripts has execute permission

Reply via email to