[BRE-1935] Phase 2: Convert cd.yml to trigger-actions caller - #136
Draft
AmyLGalles wants to merge 1 commit into
Draft
[BRE-1935] Phase 2: Convert cd.yml to trigger-actions caller#136AmyLGalles wants to merge 1 commit into
AmyLGalles wants to merge 1 commit into
Conversation
This converts the cd.yml workflow from the old passwordless-devops dispatch
pattern to the new trigger-actions deployment event pattern, dispatching to
bitwarden/deploy's deploy-passwordless-nodejs.yml receiver workflow.
Changes:
- Replaced passwordless-devops gh workflow run dispatch with trigger-actions
- Removed BW-GHAPP token generation (no longer needed)
- Switched keyvault from gh-org-bitwarden to trigger-actions' internal handling
- Updated action versions (checkout v7.0.0, setup-node v6.3.0)
- Renamed deploy job to trigger-deploy for clarity
- Split deploy job into separate build and trigger-deploy jobs
- Moved artifact upload to build job (runs before trigger)
- Added workflow-level permissions: {}
The build and lint jobs remain in the source repo; deployment logic now lives
in bitwarden/deploy following the BRE-1935 centralization pattern.
This completes Phase 2 (finalize-source) of the BRE-1935 migration.
Phase 3 (wire trigger-actions.yml receiver) is next.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This is Phase 2 of 3 (finalize-source) for migrating passwordless-nodejs's npm publishing workflow to the centralized deploy repo as part of BRE-1935.
What This PR Does
Converts the
cd.ymlworkflow to use trigger-actions deployment events, delegating the actual npm publishing tobitwarden/deploy's standardized workflow.Pattern: Full Migration (like passwordless-java)
Unlike the passwordless-devops hybrid pattern used for
deploy-passwordless-nodejs.yml, this cd.yml workflow follows the full migration pattern:bitwarden/deploy(already merged)Current Workflow
The workflow keeps its build and format steps but replaces the publish logic:
Retained (unchanged):
formatjob: Runs lintingbuildjob: Runs npm build and uploads artifactsModified:
trigger-deployjob: Now emits deployment event tobitwarden/deployrelease: publishedeventsChanges Applied
1. Trigger-Actions Integration
The
trigger-deployjob now usesbitwarden/gh-actions/trigger-actions@main:2. What Gets Forwarded
Single input forwarded to deployment event:
tag: Release tag name (e.g.,v1.0.0)The deploy repo receiver workflow will:
3. Workflow Flow
Before (if this was the old pattern):
After (this PR):
How It Works
Current Flow (After This PR + Phase 3)
Release Published in passwordless-nodejs
Build & Format (this workflow)
formatjob)buildjob)Trigger Deployment (this workflow)
bitwarden/deploydeploy-passwordless-nodejs{ "tag": "v1.0.0" }Publish Runs (bitwarden/deploy)
trigger-actions.ymlreceives deployment eventdeploy-passwordless-nodejs.ymlThree-Stage Migration Status
Phase 1: Draft ✅ Complete
bitwarden/deployPhase 2: Finalize Source ⏳ This PR
Phase 3: Wire Trigger ⏳ Next
trigger-deploy-passwordless-nodejsjob totrigger-actions.ymlComparison with passwordless-java
This follows the same pattern as passwordless-java Phase 2:
release: publishedrelease: publishedTesting Plan
After Phase 3 completes:
Create and publish a test release:
Verify workflow runs:
Verify npm package published
Rollback Plan
If issues arise:
Related
.github/workflows/deploy-passwordless-nodejs.ymlValidation