Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
ci(dev): auto-deploy Trigger.dev tasks + fail dev db:push on TTY prompt#5343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5fc0086
ci(trigger): auto-deploy Trigger.dev tasks to dev-sim on dev pushes
TheodoreSpeaks e6507f2
ci(trigger): source TRIGGER_PROJECT_ID from repo secret
TheodoreSpeaks d22b025
ci(trigger): fail fast when Trigger.dev secrets are unset
TheodoreSpeaks cb2aa5e
ci(migrations): fail dev db:push on interactive prompt or error
TheodoreSpeaks 3b13560
ci(migrations): fail dev db:push when drizzle-kit hits a TTY prompt
TheodoreSpeaks bc3b5ad
ci(trigger): scope the access token secret as DEV_TRIGGER_ACCESS_TOKEN
TheodoreSpeaks b0be41d
Adjust warning error
TheodoreSpeaks c2652f6
ci: align build-dev checkout to v6 to match the other jobs
TheodoreSpeaks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -92,7 +92,7 @@ jobs: | ||
| ecr_repo_secret: ECR_PII | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | ||
| - name: Configure AWS credentials | ||
| uses: aws-actions/configure-aws-credentials@e7f100cf4c008499ea8adda475de1042d6975c7b # v6 | ||
| @@ -130,6 +130,49 @@ jobs: | ||
| provenance: false | ||
| sbom: false | ||
| # Dev: deploy Trigger.dev background tasks to the preview "dev-sim" branch. | ||
| # Gated after migrate-dev for the same reason as build-dev — the new task | ||
| # code runs against the dev DB, so the schema must be pushed first. | ||
| deploy-trigger-dev: | ||
| name: Deploy Trigger.dev (Dev) | ||
| needs: [migrate-dev] | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/dev' | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | ||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 | ||
| with: | ||
| bun-version: 1.3.13 | ||
| - name: Cache Bun dependencies | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | ||
| with: | ||
| path: | | ||
| ~/.bun/install/cache | ||
| node_modules | ||
| **/node_modules | ||
| key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-bun- | ||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
| - name: Deploy to Trigger.dev | ||
| working-directory: ./apps/sim | ||
| env: | ||
| TRIGGER_ACCESS_TOKEN: ${{ secrets.DEV_TRIGGER_ACCESS_TOKEN }} | ||
| TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }} | ||
cursor[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| run: | | ||
| if [ -z "$TRIGGER_ACCESS_TOKEN" ] || [ -z "$TRIGGER_PROJECT_ID" ]; then | ||
| echo "ERROR: DEV_TRIGGER_ACCESS_TOKEN and TRIGGER_PROJECT_ID repo secrets must both be set" >&2 | ||
| exit 1 | ||
cursor[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| fi | ||
| bunx trigger.dev@4.4.3 deploy --env preview --branch dev-sim | ||
| # Main/staging: build AMD64 images and push to ECR + GHCR | ||
| build-amd64: | ||
| name: Build AMD64 | ||
| @@ -359,7 +402,7 @@ jobs: | ||
| steps: | ||
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | ||
| with: | ||
| fetch-depth: 2 # Need at least 2 commits to detect changes | ||
| fetch-depth: 2 # Need at least 2 commits to detect changes | ||
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4 | ||
| id: filter | ||
| with: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.