-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(webapp): pin the dashboard agent to a deployed version #4128
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
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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 |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: "🤖 Deploy dashboard agent" | ||
|
|
||
| # Deploys the @internal/dashboard-agent chat.agent to its Trigger.dev project | ||
| # with --skip-promotion, so a deploy never becomes "current" on its own. The | ||
| # consuming app cuts over by pinning DASHBOARD_AGENT_VERSION to the new version. | ||
| # Pushes to main that touch the agent auto-deploy to staging; prod is a manual | ||
| # workflow_dispatch. The project ref + a scoped deploy PAT come from the target | ||
| # environment (dashboard-agent-staging / dashboard-agent-prod). | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "internal-packages/dashboard-agent/**" | ||
| workflow_dispatch: | ||
| inputs: | ||
| environment: | ||
| description: "Trigger.dev environment to deploy to" | ||
| type: choice | ||
| options: [staging, prod] | ||
| default: staging | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: dashboard-agent-deploy-${{ github.event.inputs.environment || 'staging' }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| deploy: | ||
| name: Deploy dashboard agent | ||
| runs-on: ubuntu-latest | ||
| environment: dashboard-agent-${{ github.event.inputs.environment || 'staging' }} | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| TRIGGER_API_URL: https://api.trigger.dev | ||
| TRIGGER_DASHBOARD_AGENT_PROJECT_REF: ${{ vars.TRIGGER_DASHBOARD_AGENT_PROJECT_REF }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | ||
| with: | ||
| version: 10.33.2 | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: 20.20.2 | ||
| cache: "pnpm" | ||
|
|
||
| - name: Install + build the CLI and the agent's deps | ||
| run: | | ||
| set -euo pipefail | ||
| pnpm install --frozen-lockfile | ||
| # Prisma client is needed because the build closure pulls in @trigger.dev/database. | ||
| pnpm run generate | ||
| # Config-time imports the agent's trigger.config.ts needs: defineConfig (sdk), aptGet (build). | ||
| pnpm run build --filter trigger.dev --filter @trigger.dev/build --filter @trigger.dev/sdk | ||
|
|
||
| - name: Deploy (--skip-promotion) | ||
| working-directory: internal-packages/dashboard-agent | ||
| env: | ||
| TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_DASHBOARD_AGENT_DEPLOY_TOKEN }} | ||
| # Invoke the built CLI directly (what the workspace .bin/trigger wrapper does), | ||
| # so a not-yet-linked bin after a fresh install can't break the deploy. | ||
| run: node ../../packages/cli-v3/dist/esm/index.js deploy --skip-promotion --env ${{ github.event.inputs.environment || 'staging' }} | ||
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
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
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.
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.