Skip to content

Commit

Permalink
Update workflow input
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Dec 9, 2024
1 parent e874a1b commit 790c6bf
Showing 1 changed file with 31 additions and 24 deletions.
55 changes: 31 additions & 24 deletions .github/workflows/release-chromadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,30 +104,6 @@ jobs:
push: true
tags: "${{ env.GHCR_IMAGE_NAME }}:${{ needs.get-version.outputs.version }},${{ env.DOCKERHUB_IMAGE_NAME }}:${{ needs.get-version.outputs.version }},${{ env.GHCR_IMAGE_NAME }}:latest,${{ env.DOCKERHUB_IMAGE_NAME }}:latest"

release-hosted:
name: Release to Chroma Cloud
runs-on: ubuntu-latest
needs:
- release-docker
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Trigger Hosted Chroma FE Release
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-data-plane.yaml',
ref: 'main',
inputs: {
"oss-sha": "${{ github.sha }}",
}
})
release-pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
Expand Down Expand Up @@ -268,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 790c6bf

Please sign in to comment.