π OpenHands: AI-Driven Development
ci: try to fix runtime build when exact hash for runtime image is found (#3272)
Xingyao Wang73bd1651187e
diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.ymlindex 9b757da9c5..1846e8742f 100644--- a/.github/workflows/ghcr.yml+++ b/.github/workflows/ghcr.yml@@ -123,7 +123,18 @@ jobs:run: poetry run python3 opendevin/runtime/utils/runtime_build.py --base_image ${{ matrix.base_image }} --build_folder containers/runtime- name: Build and export imageid: build- run: ./containers/build.sh ${{ matrix.image }} ${{ github.repository_owner }} ${{ matrix.platform }}+ run: |+ if [ -f 'containers/runtime/Dockerfile' ]; then+ echo 'Dockerfile detected, building runtime image...'+ ./containers/build.sh ${{ matrix.image }} ${{ github.repository_owner }} ${{ matrix.platform }}+ else+ echo 'No Dockerfile detected which means an exact image is already built. Pulling the image and saving it to a tar file...'+ source containers/runtime/config.sh+ echo '$DOCKER_IMAGE_TAG $DOCKER_IMAGE_HASH_TAG' >> tags.txt+ echo "Pulling image $DOCKER_IMAGE/$DOCKER_IMAGE_HASH_TAG to /tmp/${{ matrix.image }}_image_${{ matrix.platform }}.tar"+ docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_HASH_TAG+ docker save $DOCKER_IMAGE:$DOCKER_IMAGE_HASH_TAG -o /tmp/${{ matrix.image }}_image_${{ matrix.platform }}.tar+ fi- name: Capture tagsid: capture-tagsrun: |