Skip to content

πŸ™Œ OpenHands: AI-Driven Development

try to fix DOCKER_IMAGE_TAG in ghcr_push_runtime (od_runtime, arm64) (#3311)

tobitege5e6fd58f5684
diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml
index dd04e2532d..4477d0bf6a 100644
--- a/.github/workflows/ghcr.yml
+++ b/.github/workflows/ghcr.yml
@@ -305,7 +305,7 @@ jobs:
needs: [ghcr_build_runtime, test_runtime, runtime_integration_tests_on_linux]
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
env:
- tags: ${{ needs.ghcr_build_runtime.outputs.tags }}
+ RUNTIME_TAGS: ${{ needs.ghcr_build_runtime.outputs.tags }}
permissions:
contents: read
packages: write
@@ -349,16 +349,15 @@ jobs:
exit 1
fi
echo "loaded image = $loaded_image"
- tags=$(echo ${tags} | tr ' ' '\n')
image_name=$(echo "ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}" | tr '[:upper:]' '[:lower:]')
echo "image name = $image_name"
- for tag in $tags; do
+ echo "$RUNTIME_TAGS" | tr ' ' '\n' | while read -r tag; do
echo "tag = $tag"
- if [ -n "$image_name" ]; then
+ if [ -n "$image_name" ] && [ -n "$tag" ]; then
docker tag $loaded_image $image_name:${tag}_${{ matrix.platform }}
docker push $image_name:${tag}_${{ matrix.platform }}
else
- echo "Skipping tag and push due to empty image_name"
+ echo "Skipping tag and push due to empty image_name or tag"
fi
done