From 191d887f5dec2f39aa61eae1105dd82aafe11306 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Tue, 30 Sep 2025 18:16:26 -0700 Subject: [PATCH 1/3] Revert trigger promotion --- .github/workflows/ci.yml | 15 +++++++++-- .github/workflows/trigger-deploy.yml | 39 ++-------------------------- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48e6c0b7d1d..78db8998d34 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: uses: ./.github/workflows/test-build.yml secrets: inherit +<<<<<<< HEAD # Deploy Trigger.dev FIRST (right after test-build, before images) trigger-deploy: name: Deploy Trigger.dev @@ -27,10 +28,12 @@ jobs: id-token: write contents: read +======= +>>>>>>> 27b05ad97 (Revert trigger promotion) # Build AMD64 images and push to ECR immediately (+ GHCR for main) build-amd64: name: Build AMD64 - needs: trigger-deploy + needs: test-build if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') runs-on: blacksmith-4vcpu-ubuntu-2404 permissions: @@ -122,7 +125,7 @@ jobs: # Build ARM64 images for GHCR (main branch only, runs in parallel) build-ghcr-arm64: name: Build ARM64 (GHCR Only) - needs: trigger-deploy + needs: test-build runs-on: linux-arm64-8-core if: github.event_name == 'push' && github.ref == 'refs/heads/main' permissions: @@ -170,6 +173,14 @@ jobs: provenance: false sbom: false + # Deploy Trigger.dev (after ECR images are pushed) + trigger-deploy: + name: Deploy Trigger.dev + needs: build-amd64 + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') + uses: ./.github/workflows/trigger-deploy.yml + secrets: inherit + # Create GHCR multi-arch manifests (only for main, after both builds) create-ghcr-manifests: name: Create GHCR Manifests diff --git a/.github/workflows/trigger-deploy.yml b/.github/workflows/trigger-deploy.yml index 93a145019d5..b37ad19dcd8 100644 --- a/.github/workflows/trigger-deploy.yml +++ b/.github/workflows/trigger-deploy.yml @@ -13,9 +13,6 @@ jobs: cancel-in-progress: false env: TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }} - permissions: - id-token: write - contents: read steps: - name: Checkout code @@ -34,44 +31,12 @@ jobs: - name: Install dependencies run: bun install - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }} - aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }} - - name: Deploy to Trigger.dev (Staging) if: github.ref == 'refs/heads/staging' - id: deploy-staging working-directory: ./apps/sim - env: - TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }} - run: | - npx --yes trigger.dev@4.0.4 deploy -e staging --skip-promotion - - - name: Store Staging version in Parameter Store - if: github.ref == 'refs/heads/staging' - run: | - aws ssm put-parameter \ - --name "${{ secrets.TRIGGER_VERSION_SECRET_MANAGER_STAGING }}" \ - --value "${{ steps.deploy-staging.outputs.deploymentVersion }}" \ - --type "String" \ - --overwrite + run: npx --yes trigger.dev@4.0.4 deploy -e staging - name: Deploy to Trigger.dev (Production) if: github.ref == 'refs/heads/main' - id: deploy-production working-directory: ./apps/sim - env: - TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }} - run: | - npx --yes trigger.dev@4.0.4 deploy --skip-promotion - - - name: Store Production version in Parameter Store - if: github.ref == 'refs/heads/main' - run: | - aws ssm put-parameter \ - --name "${{ secrets.TRIGGER_VERSION_SECRET_MANAGER_PROD }}" \ - --value "${{ steps.deploy-production.outputs.deploymentVersion }}" \ - --type "String" \ - --overwrite \ No newline at end of file + run: npx --yes trigger.dev@4.0.4 deploy From 9329bdeb761a4dc96b32e3fd71fd460561c1273a Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Tue, 30 Sep 2025 18:25:04 -0700 Subject: [PATCH 2/3] Move trigger --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78db8998d34..940a17c233e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,14 +173,6 @@ jobs: provenance: false sbom: false - # Deploy Trigger.dev (after ECR images are pushed) - trigger-deploy: - name: Deploy Trigger.dev - needs: build-amd64 - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') - uses: ./.github/workflows/trigger-deploy.yml - secrets: inherit - # Create GHCR multi-arch manifests (only for main, after both builds) create-ghcr-manifests: name: Create GHCR Manifests @@ -220,7 +212,15 @@ jobs: "${IMAGE_BASE}:${{ github.sha }}-arm64" docker manifest push "${IMAGE_BASE}:${{ github.sha }}" - # Process docs embeddings (only needs ECR images from build-amd64) + # Deploy Trigger.dev (after ECR images are pushed, runs in parallel with process-docs) + trigger-deploy: + name: Deploy Trigger.dev + needs: build-amd64 + if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') + uses: ./.github/workflows/trigger-deploy.yml + secrets: inherit + + # Process docs embeddings (after ECR images are pushed, runs in parallel with trigger-deploy) process-docs: name: Process Docs needs: build-amd64 From 010f28e7432d1a19e8b6c9ccf0166845290f6a3a Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Tue, 30 Sep 2025 18:29:09 -0700 Subject: [PATCH 3/3] Fix ci --- .github/workflows/ci.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 940a17c233e..5262ef8212f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,20 +16,6 @@ jobs: uses: ./.github/workflows/test-build.yml secrets: inherit -<<<<<<< HEAD - # Deploy Trigger.dev FIRST (right after test-build, before images) - trigger-deploy: - name: Deploy Trigger.dev - needs: test-build - if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') - uses: ./.github/workflows/trigger-deploy.yml - secrets: inherit - permissions: - id-token: write - contents: read - -======= ->>>>>>> 27b05ad97 (Revert trigger promotion) # Build AMD64 images and push to ECR immediately (+ GHCR for main) build-amd64: name: Build AMD64