-
Notifications
You must be signed in to change notification settings - Fork 74
ci: fix cloud-mcp preview auto-deploy (GitHub App auth + released version) #1092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,21 +81,45 @@ jobs: | |
| uses: pypa/gh-action-pypi-publish@v1.13.0 | ||
|
|
||
| # Prod cloud-mcp is bumped via Dependabot on airbytehq/airbyte-ops-mcp, not here. | ||
| # A PyPI publish only refreshes the cloud-mcp preview against the new version. | ||
| # A PyPI publish dispatches the just-released version to airbyte-ops-mcp, which | ||
| # opens/refreshes a deterministic `airbyte==<version>` bump PR and deploys the | ||
| # cloud-mcp preview off it (see `deploy-mcp-command.yml`). | ||
| deploy_cloud_mcp_preview: | ||
| name: Deploy Cloud MCP (Preview) | ||
| needs: publish_to_pypi | ||
| if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true') | ||
| runs-on: ubuntu-latest | ||
| permissions: {} | ||
| steps: | ||
| - name: Resolve released version | ||
| id: version | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "release" ]; then | ||
| raw="${{ github.event.release.tag_name }}" | ||
| else | ||
| raw="${{ github.event.inputs.version_override }}" | ||
| fi | ||
| echo "value=${raw#v}" >> "$GITHUB_OUTPUT" | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Wait for PyPI availability | ||
| run: sleep 120 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Cross-repo dispatch is authenticated with an Octavia GitHub App token | ||
| # scoped to airbyte-ops-mcp (the app must be installed there with | ||
| # contents: write), matching the pattern used by prerelease-command.yml. | ||
| - name: Authenticate as GitHub App | ||
| uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4 | ||
| id: get-app-token | ||
| with: | ||
| owner: airbytehq | ||
| repositories: airbyte-ops-mcp | ||
| app-id: ${{ secrets.OCTAVIA_BOT_APP_ID }} | ||
| private-key: ${{ secrets.OCTAVIA_BOT_PRIVATE_KEY }} | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Trigger cloud-mcp preview deploy | ||
| uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 | ||
| with: | ||
| token: ${{ secrets.GITHUB_CI_WORKFLOW_TRIGGER_PAT }} | ||
| token: ${{ steps.get-app-token.outputs.token }} | ||
| repository: airbytehq/airbyte-ops-mcp | ||
| event-type: deploy-cloud-mcp | ||
| client-payload: '{"mcp-server": "cloud-mcp", "preview": "true"}' | ||
| client-payload: '{"mcp-server": "cloud-mcp", "preview": "true", "airbyte-version": "${{ steps.version.outputs.value }}"}' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ☑️ Resolved in f645196. The version is now validated against a PEP 440-ish regex ( |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
☑️ Resolved in f645196. Reworded the comment to make the cross-repo location explicit: "dispatches the just-released version to airbyte-ops-mcp, whose
deploy-mcp-command.ymlopens/refreshes a deterministicairbyte==<version>bump PR and deploys the cloud-mcp preview off it." That consuming workflow lives in airbytehq/airbyte-ops-mcp#1175.