Skip to content

Commit 7e6a5dc

Browse files
authored
Fix/remove trigger promotion (#1513)
* Revert trigger promotion * Move trigger * Fix ci
1 parent c1a3500 commit 7e6a5dc

File tree

2 files changed

+13
-51
lines changed

2 files changed

+13
-51
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,10 @@ jobs:
1616
uses: ./.github/workflows/test-build.yml
1717
secrets: inherit
1818

19-
# Deploy Trigger.dev FIRST (right after test-build, before images)
20-
trigger-deploy:
21-
name: Deploy Trigger.dev
22-
needs: test-build
23-
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
24-
uses: ./.github/workflows/trigger-deploy.yml
25-
secrets: inherit
26-
permissions:
27-
id-token: write
28-
contents: read
29-
3019
# Build AMD64 images and push to ECR immediately (+ GHCR for main)
3120
build-amd64:
3221
name: Build AMD64
33-
needs: trigger-deploy
22+
needs: test-build
3423
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
3524
runs-on: blacksmith-4vcpu-ubuntu-2404
3625
permissions:
@@ -122,7 +111,7 @@ jobs:
122111
# Build ARM64 images for GHCR (main branch only, runs in parallel)
123112
build-ghcr-arm64:
124113
name: Build ARM64 (GHCR Only)
125-
needs: trigger-deploy
114+
needs: test-build
126115
runs-on: linux-arm64-8-core
127116
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
128117
permissions:
@@ -209,7 +198,15 @@ jobs:
209198
"${IMAGE_BASE}:${{ github.sha }}-arm64"
210199
docker manifest push "${IMAGE_BASE}:${{ github.sha }}"
211200
212-
# Process docs embeddings (only needs ECR images from build-amd64)
201+
# Deploy Trigger.dev (after ECR images are pushed, runs in parallel with process-docs)
202+
trigger-deploy:
203+
name: Deploy Trigger.dev
204+
needs: build-amd64
205+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
206+
uses: ./.github/workflows/trigger-deploy.yml
207+
secrets: inherit
208+
209+
# Process docs embeddings (after ECR images are pushed, runs in parallel with trigger-deploy)
213210
process-docs:
214211
name: Process Docs
215212
needs: build-amd64

.github/workflows/trigger-deploy.yml

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313
cancel-in-progress: false
1414
env:
1515
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
16-
permissions:
17-
id-token: write
18-
contents: read
1916

2017
steps:
2118
- name: Checkout code
@@ -34,44 +31,12 @@ jobs:
3431
- name: Install dependencies
3532
run: bun install
3633

37-
- name: Configure AWS credentials
38-
uses: aws-actions/configure-aws-credentials@v4
39-
with:
40-
role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
41-
aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
42-
4334
- name: Deploy to Trigger.dev (Staging)
4435
if: github.ref == 'refs/heads/staging'
45-
id: deploy-staging
4636
working-directory: ./apps/sim
47-
env:
48-
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
49-
run: |
50-
npx --yes [email protected] deploy -e staging --skip-promotion
51-
52-
- name: Store Staging version in Parameter Store
53-
if: github.ref == 'refs/heads/staging'
54-
run: |
55-
aws ssm put-parameter \
56-
--name "${{ secrets.TRIGGER_VERSION_SECRET_MANAGER_STAGING }}" \
57-
--value "${{ steps.deploy-staging.outputs.deploymentVersion }}" \
58-
--type "String" \
59-
--overwrite
37+
run: npx --yes [email protected] deploy -e staging
6038

6139
- name: Deploy to Trigger.dev (Production)
6240
if: github.ref == 'refs/heads/main'
63-
id: deploy-production
6441
working-directory: ./apps/sim
65-
env:
66-
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
67-
run: |
68-
npx --yes [email protected] deploy --skip-promotion
69-
70-
- name: Store Production version in Parameter Store
71-
if: github.ref == 'refs/heads/main'
72-
run: |
73-
aws ssm put-parameter \
74-
--name "${{ secrets.TRIGGER_VERSION_SECRET_MANAGER_PROD }}" \
75-
--value "${{ steps.deploy-production.outputs.deploymentVersion }}" \
76-
--type "String" \
77-
--overwrite
42+
run: npx --yes [email protected] deploy

0 commit comments

Comments
 (0)