mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
Fix/remove trigger promotion (#1513)
* Revert trigger promotion * Move trigger * Fix ci
This commit is contained in:
committed by
GitHub
parent
c1a3500bde
commit
7e6a5dc7e2
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@@ -16,21 +16,10 @@ jobs:
|
|||||||
uses: ./.github/workflows/test-build.yml
|
uses: ./.github/workflows/test-build.yml
|
||||||
secrets: inherit
|
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 images and push to ECR immediately (+ GHCR for main)
|
||||||
build-amd64:
|
build-amd64:
|
||||||
name: 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')
|
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||||
permissions:
|
permissions:
|
||||||
@@ -122,7 +111,7 @@ jobs:
|
|||||||
# Build ARM64 images for GHCR (main branch only, runs in parallel)
|
# Build ARM64 images for GHCR (main branch only, runs in parallel)
|
||||||
build-ghcr-arm64:
|
build-ghcr-arm64:
|
||||||
name: Build ARM64 (GHCR Only)
|
name: Build ARM64 (GHCR Only)
|
||||||
needs: trigger-deploy
|
needs: test-build
|
||||||
runs-on: linux-arm64-8-core
|
runs-on: linux-arm64-8-core
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
permissions:
|
permissions:
|
||||||
@@ -209,7 +198,15 @@ jobs:
|
|||||||
"${IMAGE_BASE}:${{ github.sha }}-arm64"
|
"${IMAGE_BASE}:${{ github.sha }}-arm64"
|
||||||
docker manifest push "${IMAGE_BASE}:${{ github.sha }}"
|
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:
|
process-docs:
|
||||||
name: Process Docs
|
name: Process Docs
|
||||||
needs: build-amd64
|
needs: build-amd64
|
||||||
|
|||||||
39
.github/workflows/trigger-deploy.yml
vendored
39
.github/workflows/trigger-deploy.yml
vendored
@@ -13,9 +13,6 @@ jobs:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
env:
|
env:
|
||||||
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
|
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -34,44 +31,12 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
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)
|
- name: Deploy to Trigger.dev (Staging)
|
||||||
if: github.ref == 'refs/heads/staging'
|
if: github.ref == 'refs/heads/staging'
|
||||||
id: deploy-staging
|
|
||||||
working-directory: ./apps/sim
|
working-directory: ./apps/sim
|
||||||
env:
|
run: npx --yes trigger.dev@4.0.4 deploy -e staging
|
||||||
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
|
|
||||||
|
|
||||||
- name: Deploy to Trigger.dev (Production)
|
- name: Deploy to Trigger.dev (Production)
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
id: deploy-production
|
|
||||||
working-directory: ./apps/sim
|
working-directory: ./apps/sim
|
||||||
env:
|
run: npx --yes trigger.dev@4.0.4 deploy
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user