Просмотр исходного кода

fix: ci docker upload (#3469)

* fix upload workflow

* fix typo in filename

* fix ghcr runtime

* rename ghcr to ghcr runtime

* fix upload app docker again
Xingyao Wang 1 год назад
Родитель
Сommit
356cbe0adf
2 измененных файлов с 5 добавлено и 6 удалено
  1. 4 4
      .github/workflows/ghcr_app.yml
  2. 1 2
      .github/workflows/ghcr_runtime.yml

+ 4 - 4
.github/workflows/gchr_app.yml → .github/workflows/ghcr_app.yml

@@ -69,7 +69,7 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: ${{ matrix.image }}_image_${{ matrix.platform }}
-          path: /tmp/${{ matrix.image }}_image_${{ matrix.platform }}.tar
+          path: /tmp/${{ matrix.image }}_$(echo "${{ steps.capture-tags.outputs.tags }}" | awk '{print $NF}')_${{ matrix.platform }}.tar
           retention-days: 14
 
   # Push the OpenHands and sandbox Docker images to the ghcr.io repository
@@ -99,11 +99,11 @@ jobs:
         uses: actions/download-artifact@v4
         with:
           name: ${{ matrix.image }}_image_${{ matrix.platform }}
-          path: /tmp/${{ matrix.platform }}
+          path: /tmp/${{ matrix.image }}_${{ steps.capture-tags.outputs.tags }}_${{ matrix.platform }}.tar
       - name: Load images and push to registry
         run: |
-          mv /tmp/${{ matrix.platform }}/${{ matrix.image }}_image_${{ matrix.platform }}.tar .
-          loaded_image=$(docker load -i ${{ matrix.image }}_image_${{ matrix.platform }}.tar | grep "Loaded image:" | head -n 1 | awk '{print $3}')
+          mv /tmp/${{ matrix.platform }}/${{ matrix.image }}_${{ steps.capture-tags.outputs.tags }}_${{ matrix.platform }}.tar .
+          loaded_image=$(docker load -i ${{ matrix.image }}_${{ steps.capture-tags.outputs.tags }}_${{ matrix.platform }}.tar | grep "Loaded image:" | head -n 1 | awk '{print $3}')
           echo "loaded image = $loaded_image"
           tags=$(echo ${tags} | tr ' ' '\n')
           image_name=$(echo "ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}" | tr '[:upper:]' '[:lower:]')

+ 1 - 2
.github/workflows/ghcr.yml → .github/workflows/ghcr_runtime.yml

@@ -300,8 +300,7 @@ jobs:
           path: /tmp/${{ matrix.image }}_${{ matrix.last_tag }}_${{ matrix.platform }}.tar
       - name: List downloaded files
         run: |
-          ls -la /tmp/${{ matrix.platform }}
-          file /tmp/${{ matrix.platform }}/*
+          ls -la /tmp/*
       - name: Load images and push to registry
         run: |
           image_file=$(find /tmp/${{ matrix.platform }} -name "${{ matrix.image }}_${{ matrix.last_tag }}_${{ matrix.platform }}.tar" | head -n 1)