From 7e6a5dc7e2872a80eaafc66d169c05603d9a54f4 Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com> Date: Tue, 30 Sep 2025 18:29:28 -0700 Subject: [PATCH] Fix/remove trigger promotion (#1513) * Revert trigger promotion * Move trigger * Fix ci --- .github/workflows/ci.yml | 25 ++++++++---------- .github/workflows/trigger-deploy.yml | 39 ++-------------------------- 2 files changed, 13 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48e6c0b7d..5262ef821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,21 +16,10 @@ jobs: uses: ./.github/workflows/test-build.yml secrets: inherit - # 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 - # 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 +111,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: @@ -209,7 +198,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 diff --git a/.github/workflows/trigger-deploy.yml b/.github/workflows/trigger-deploy.yml index 93a145019..b37ad19dc 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