Преглед на файлове

update release action

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang преди 5 месеца
родител
ревизия
685a715aaa
променени са 1 файла, в които са добавени 4 реда и са изтрити 8 реда
  1. 4 8
      .github/workflows/release.yml

+ 4 - 8
.github/workflows/release.yml

@@ -26,13 +26,9 @@ jobs:
       - name: Check out Git repository
       - name: Check out Git repository
         uses: actions/checkout@v4
         uses: actions/checkout@v4
 
 
-      - name: Extract Major.Minor tag
-        id: extract_version
-        run: |
-          # Remove the leading 'v' and split the version into major.minor (e.g., v2.4.11 -> 2.4)
-          VERSION="${GITHUB_REF##*/}"
-          MAJOR_MINOR_TAG="$(echo $VERSION | cut -d. -f1,2)"
-          echo "MAJOR_MINOR_TAG=$MAJOR_MINOR_TAG" >> $GITHUB_ENV
+      - name: Extract Major.Minor tag (only for Docker job)
+        if: matrix.name == 'Docker Build'
+        uses: damienaicheh/extract-version-from-tag-action@v1.3.0
 
 
       - name: Install Node.js, NPM, and Yarn
       - name: Install Node.js, NPM, and Yarn
         uses: actions/setup-node@v4
         uses: actions/setup-node@v4
@@ -75,7 +71,7 @@ jobs:
           platforms: ${{ matrix.platform }}
           platforms: ${{ matrix.platform }}
           tags: |
           tags: |
             zilliz/attu:${{ github.ref_name }}
             zilliz/attu:${{ github.ref_name }}
-            zilliz/attu:${{ env.MAJOR_MINOR_TAG }}
+            zilliz/attu:v${{ env.MAJOR_MINOR_TAG }}.${{ env.MINOR }}
           cache-from: type=registry,ref=zilliz/attu:cache
           cache-from: type=registry,ref=zilliz/attu:cache
           cache-to: type=inline
           cache-to: type=inline
           build-args: |
           build-args: |