From 3f003bafe5fbdf2b2eecf46adcfcbd94adae2ed9 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Mon, 29 Dec 2025 10:25:33 -0300 Subject: [PATCH] feat: add PUSH_IMAGE input for docker builds (#26254) * feat: add PUSH_IMAGE boolean input to release-docker workflow Co-Authored-By: keith@cal.com * refactor: simplify push-image expression to always return string Co-Authored-By: keith@cal.com * fix: make RELEASE_TAG input work for manual workflow triggers Co-Authored-By: keith@cal.com * fix: add postMessage listener to capture __iframeReady events early This fixes a race condition in the embed E2E tests where the __iframeReady event could fire before the Cal.ns[namespace] API was ready to receive it. The fix adds a window.message listener immediately in the addInitScript that captures __iframeReady events directly from postMessage, which doesn't depend on the namespace API being ready. This ensures window.iframeReady is set even if the event fires before the Cal API listener is attached. Co-Authored-By: keith@cal.com * Revert "fix: add postMessage listener to capture __iframeReady events early" This reverts commit fdd02fcf1e5286f2b3b36a9f4c9889b269720845. --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/release-docker.yaml | 29 ++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-docker.yaml b/.github/workflows/release-docker.yaml index dbc172deea..5df5ce7521 100644 --- a/.github/workflows/release-docker.yaml +++ b/.github/workflows/release-docker.yaml @@ -14,7 +14,12 @@ on: workflow_dispatch: inputs: RELEASE_TAG: - description: "v{Major}.{Minor}.{Patch}" + description: "Tag to build (e.g., v6.0.5)" + required: true + PUSH_IMAGE: + description: "Push the Docker image to DockerHub" + type: boolean + default: true jobs: release-amd64: @@ -23,9 +28,16 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + with: + ref: ${{ inputs.RELEASE_TAG || github.ref }} - name: "Determine tag" - run: 'echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV' + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "RELEASE_TAG=${{ inputs.RELEASE_TAG }}" >> $GITHUB_ENV + else + echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + fi - name: Build and test Docker image uses: ./.github/actions/docker-build-and-test @@ -39,7 +51,7 @@ jobs: postgres-password: ${{ env.POSTGRES_PASSWORD }} postgres-db: ${{ env.POSTGRES_DB }} database-host: ${{ env.DATABASE_HOST }} - push-image: "true" + push-image: ${{ (github.event_name == 'push' || inputs.PUSH_IMAGE) && 'true' || 'false' }} use-as-latest: "true" - name: Notify Slack on Success @@ -70,9 +82,16 @@ jobs: steps: - name: checkout uses: actions/checkout@v4 + with: + ref: ${{ inputs.RELEASE_TAG || github.ref }} - name: "Determine tag" - run: 'echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV' + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + echo "RELEASE_TAG=${{ inputs.RELEASE_TAG }}" >> $GITHUB_ENV + else + echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + fi - name: Build and test Docker image uses: ./.github/actions/docker-build-and-test @@ -86,7 +105,7 @@ jobs: postgres-password: ${{ env.POSTGRES_PASSWORD }} postgres-db: ${{ env.POSTGRES_DB }} database-host: ${{ env.DATABASE_HOST }} - push-image: "true" + push-image: ${{ (github.event_name == 'push' || inputs.PUSH_IMAGE) && 'true' || 'false' }} - name: Notify Slack on Success if: success()