-
Notifications
You must be signed in to change notification settings - Fork 1.4k
34 lines (32 loc) · 1.08 KB
/
trigger-deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Trigger deploy
run-name: Trigger deploy from ${{ github.ref_name }}
on:
push:
branches:
# main is not included here because it is handled by the release-chromadb.yaml workflow
- rc/**-**-**
- release/**-**-**
jobs:
deploy:
name: Dispatch deploy workflow
runs-on: ubuntu-latest
steps:
- 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: {
'planes': 'control,data',
environment: '${{ contains(github.ref, 'release/') && 'production' || 'staging' }}',
'ignore-lock': true,
'oss-ref': '${{ github.ref_name }}',
'hosted-ref': '${{ github.ref_name }}'
}
})
console.log(result)