Beaker push fix

This commit is contained in:
Jake Poznanski 2025-06-17 16:59:22 +00:00
parent 5e5c31b93e
commit 08ca1544bf

View File

@ -281,15 +281,22 @@ jobs:
env:
BEAKER_TOKEN: ${{ secrets.BEAKER_TOKEN }}
run: |
# Get the version without 'v' prefix
VERSION=${GITHUB_REF#refs/tags/v}
# Push the Docker image to Beaker
beaker image create \
# Get version
VERSION=${{ steps.meta.outputs.version }}
# Get the image ID for the versioned tag
IMAGE_ID=$(docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" | grep "alleninstituteforai/olmocr:$VERSION" | awk '{print $2}')
if [ -z "$IMAGE_ID" ]; then
echo "ERROR: Could not find image ID for tag alleninstituteforai/olmocr:$VERSION"
exit 1
fi
# Push the Docker image to Beaker using the image ID
beaker image create "$IMAGE_ID" \
--name "olmocr-inference-$VERSION" \
--workspace ai2/olmocr \
"docker://${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$VERSION"
--workspace ai2/olmocr
- name: Clean up after build
if: always()
run: |