Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tested against sandbox
  • Loading branch information
cesara committed Oct 8, 2025
commit b88e9a569cabec887fe912a0bc364979813feda6
15 changes: 14 additions & 1 deletion .github/workflows/sst-prod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ jobs:
- name: Install dependencies
run: |
npm run build-ci
- name: Resolve Zero protocol versions
run: |
PROTOCOL_FILE=packages/zero/out/zero-protocol/src/protocol-version.js
ZERO_SYNC_PROTOCOL_VERSION=$(grep -E "export const PROTOCOL_VERSION" "$PROTOCOL_FILE" | sed -E "s/.*= ([0-9]+);/\1/")
ZERO_MIN_SUPPORTED_SYNC_PROTOCOL_VERSION=$(grep -E "export const MIN_SERVER_SUPPORTED_SYNC_PROTOCOL" "$PROTOCOL_FILE" | sed -E "s/.*= ([0-9]+);/\1/")
if [ -z "$ZERO_SYNC_PROTOCOL_VERSION" ] || [ -z "$ZERO_MIN_SUPPORTED_SYNC_PROTOCOL_VERSION" ]; then
echo "Could not extract protocol versions from $PROTOCOL_FILE"
exit 1
fi
{
echo "ZERO_SYNC_PROTOCOL_VERSION=$ZERO_SYNC_PROTOCOL_VERSION"
echo "ZERO_MIN_SUPPORTED_SYNC_PROTOCOL_VERSION=$ZERO_MIN_SUPPORTED_SYNC_PROTOCOL_VERSION"
} >> "$GITHUB_ENV"
- name: Get Git SHA
id: git-sha
run: echo "SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
Expand All @@ -62,7 +75,7 @@ jobs:
cd packages/zero
docker buildx create --use
docker buildx inspect --bootstrap
docker buildx build --platform linux/amd64 --build-arg ZERO_VERSION=${{ env.ZERO_VERSION }} -t ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$ECR_IMAGE_ZERO_CACHE:${{ env.SHA }} -f ./Dockerfile --push .
docker buildx build --platform linux/amd64 --build-arg ZERO_VERSION=${{ env.ZERO_VERSION }} --build-arg ZERO_SYNC_PROTOCOL_VERSION=${{ env.ZERO_SYNC_PROTOCOL_VERSION }} --build-arg ZERO_MIN_SUPPORTED_SYNC_PROTOCOL_VERSION=${{ env.ZERO_MIN_SUPPORTED_SYNC_PROTOCOL_VERSION }} -t ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$ECR_IMAGE_ZERO_CACHE:${{ env.SHA }} -f ./Dockerfile --push .
- name: Deploy SST app
env:
ZERO_UPSTREAM_DB: ${{ secrets.PROD_ZERO_UPSTREAM_DB }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sst-sandbox-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy Sandbox Zero-Cache AWS SST

on:
push:
branches: [sandbox, cesara/ci_fix_protocol_version]
branches: [sandbox]
env:
# Setting an environment variable with the value of a configuration variable
ECR_IMAGE_ZERO_CACHE: zero-zbugs-sandbox
Expand Down
Loading