Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(eve): containers - preserve published VCR tags (#2898)

Andrew Barba057bf03ecee4
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index d4b2cc3a7..29f145f00 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -66,8 +66,26 @@ jobs:
with:
team: ${{ secrets.VCR_TEAM_ID }}
- - name: Publish eve image to Vercel Container Registry
+ - name: Check whether the eve image version is already published
if: github.ref == 'refs/heads/main'
+ id: vcr-image
+ env:
+ VCR_TAG: ${{ steps.vcr-tag.outputs.tag }}
+ run: |
+ set -euo pipefail
+
+ if inspect_output="$(docker buildx imagetools inspect --raw "$VCR_TAG" 2>&1)"; then
+ echo "publish=false" >>"$GITHUB_OUTPUT"
+ echo "$VCR_TAG is already published; skipping the image build."
+ elif grep -Eq ': not found|manifest unknown' <<<"$inspect_output"; then
+ echo "publish=true" >>"$GITHUB_OUTPUT"
+ else
+ echo "$inspect_output" >&2
+ exit 1
+ fi
+
+ - name: Publish eve image to Vercel Container Registry
+ if: github.ref == 'refs/heads/main' && steps.vcr-image.outputs.publish == 'true'
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
context: ./packages/eve