Skip to content

[BRE-1935] Migrate workflow: cd.yml (Phase 2) - #105

Draft
AmyLGalles wants to merge 2 commits into
mainfrom
agalles/BRE-1935-passwordless-python-cd
Draft

[BRE-1935] Migrate workflow: cd.yml (Phase 2)#105
AmyLGalles wants to merge 2 commits into
mainfrom
agalles/BRE-1935-passwordless-python-cd

Conversation

@AmyLGalles

Copy link
Copy Markdown

Summary

This is Phase 2 (finalize-source) of the BRE-1935 migration for the cd.yml workflow.

Phase 1 (already merged in bitwarden/deploy): https://github.com/bitwarden/deploy/pull/275

What This Does

Converts the source repo's cd.yml from a full PyPI publishing workflow to a lightweight trigger-actions caller that dispatches to the centralized workflow in bitwarden/deploy.

Changes

Before (47 lines)

  • Full build logic (poetry, python setup, build, publish)
  • Triggered only by release: [created]
  • No manual dispatch option

After (31 lines)

  • Lightweight trigger-actions caller
  • Preserves release: [created] trigger (automatic on release)
  • Adds workflow_dispatch trigger (manual dispatch option)
  • Forwards release tag to bitwarden/deploy

Developer Experience

Automatic (unchanged)

When a release is created in this repo, the workflow automatically triggers and dispatches to bitwarden/deploy for publishing.

Manual Dispatch (new)

Developers can now manually trigger publishing from this repo:

gh workflow run cd.yml --repo bitwarden/passwordless-python -f tag=v1.2.3

Actual Publishing Logic

Now lives in: bitwarden/deploy/.github/workflows/publish-passwordless-python.yml

Migration Phases

  • Phase 1: Centralized workflow in bitwarden/deploy (PR #275 - merged)
  • Phase 2 (this PR): Replace source workflow with trigger-actions caller
  • Phase 3: Wire trigger receiver in bitwarden/deploy's trigger-actions.yml

Testing

After merge:

  • Create a test release and verify it triggers the deploy workflow
  • Test manual dispatch: gh workflow run cd.yml -f tag=<test-tag>

Documentation

No documentation references to cd.yml were found in this repo.

Replaces the full PyPI publishing logic with a trigger-actions caller
that dispatches to bitwarden/deploy's publish-passwordless-python workflow.

Changes:
- Removed all build, poetry, and PyPI publishing steps
- Added workflow_dispatch trigger with tag input for manual dispatch
- Kept release: [created] trigger for automatic releases
- Uses bitwarden/gh-actions/trigger-actions to dispatch to deploy repo

The actual build and publish logic now lives in:
bitwarden/deploy/.github/workflows/publish-passwordless-python.yml

This workflow can still be triggered manually from this repo via:
  gh workflow run cd.yml --repo bitwarden/passwordless-python -f tag=v1.2.3

Or automatically when a release is created in this repo.

This completes Phase 2 (finalize-source) of the BRE-1935 migration pattern.
@AmyLGalles AmyLGalles added the ai-review Request a Claude code review label Aug 3, 2026
@AmyLGalles

Copy link
Copy Markdown
Author

@claude review this

Security fix:
- Changed workflow-level permissions from 'deployments: write' to '{}'
- Grant minimum permissions per-job only (best practice)

Functionality fix:
- Added required Azure credential inputs to trigger-actions call
- Added id-token: write permission for Azure OIDC federation

The trigger-actions composite action requires Azure credentials to
retrieve GitHub App secrets from KeyVault for cross-repo deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant