Skip to content

Commit

Permalink
[BLD] trigger hosted release workflow (#3270)
Browse files Browse the repository at this point in the history
## Description of changes

Adds action to trigger deploy of Chroma Cloud after checks pass. After
merging, our internal staging deployment of Distributed Chroma will be
gated by our CI tests (Rust tests, Python tests, etc).

## Test plan
*How are these changes tested?*

- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*

n/a
  • Loading branch information
codetheweb authored Dec 9, 2024
1 parent 0b267cf commit 702aec7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release-chromadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,37 @@ jobs:
removeArtifacts: true
prerelease: true

release-hosted:
name: Release to Chroma Cloud
runs-on: ubuntu-latest
needs:
- release-github
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Dispatch deploy
uses: actions/github-script@v6
with:
github-token: ${{ secrets.HOSTED_CHROMA_WORKFLOW_DISPATCH_TOKEN }}
script: |
const result = await github.rest.actions.createWorkflowDispatch({
owner: 'chroma-core',
repo: 'hosted-chroma',
workflow_id: 'deploy.yaml',
ref: 'main',
inputs: {
// We intentionally *do not* provide the current commit SHA of chroma-core/chroma here. The workflow we dispatch defaults to the commit tagged with "latest" (which we update above).
// If we provided the current commit here, there's a potential race condition:
// - Commit history is A -> B
// - This CI workflow runs on both commits, but the second commit finishes first
// - B is deployed to Chroma Cloud
// - This workflow finishes for A and deploys A to Chroma Cloud
// Chroma Cloud is now running A, but the last commit was B.
"environment": "staging",
"planes": "data"
}
})
release-docs:
name: Deploy docs to Vercel
runs-on: ubuntu-latest
Expand Down

0 comments on commit 702aec7

Please sign in to comment.