Example PR here:
Created from code here:
https://github.com/airbytehq/airbyte/pull/48470/files#diff-3249d7445228172f9b36422eb8685d1b2def3c8953331f8d393756c64d9be7e9L285-L388
update-connector-builder:
needs:
- bump-version
- bump-manifest-source
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Checkout Airbyte Platform Internal
uses: actions/checkout@v3
with:
repository: airbytehq/airbyte-platform-internal
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
- name: Update CDK version
run: |
PREVIOUS_VERSION=$(cat oss/airbyte-connector-builder-resources/CDK_VERSION)
sed -i "s/${PREVIOUS_VERSION}/${{needs.bump-version.outputs.new_cdk_version}}/g" oss/airbyte-connector-builder-server/Dockerfile
sed -i "s/${PREVIOUS_VERSION}/${{needs.bump-version.outputs.new_cdk_version}}/g" cloud/airbyte-connector-builder-server-wrapped/Dockerfile
sed -i "s/airbyte-cdk==${PREVIOUS_VERSION}/airbyte-cdk==${{needs.bump-version.outputs.new_cdk_version}}/g" oss/airbyte-connector-builder-server/requirements.in
echo ${{needs.bump-version.outputs.new_cdk_version}} > oss/airbyte-connector-builder-resources/CDK_VERSION
cd oss/airbyte-connector-builder-server
pip install pip-tools
pip-compile --upgrade
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
commit-message: "chore: update CDK version following release"
title: "chore: update CDK version following release"
body: This is an automatically generated PR triggered by a CDK release
branch: automatic-cdk-release
base: master
delete-branch: true
- name: Post success to Slack channel dev-connectors-extensibility
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
with:
channel-id: C04J1M66D8B
payload: |
{
"text": "A new version of Python CDK has been released!",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A new version of Python CDK has been released with <https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/python/CHANGELOG.md|changelog>: ${{ github.event.inputs.changelog-message }}\n\n"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A PR has also been created for the <${{ steps.create-pull-request.outputs.pull-request-url }}|Connector Builder>\n"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "See details on <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
- name: Post failure to Slack channel dev-connectors-extensibility
if: ${{ failure() }}
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
with:
channel-id: C04J1M66D8B
payload: |
{
"text": ":warning: A new version of Python CDK has been released but Connector Builder hasn't been automatically updated",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A new version of Python CDK has been released with <https://github.com/airbytehq/airbyte/blob/master/airbyte-cdk/python/CHANGELOG.md|changelog>: ${{ github.event.inputs.changelog-message }}\n\n"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":warning: Could not automatically create a PR for Connector Builder>\n"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "See details on <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|GitHub>\n"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
Example PR here:
Created from code here:
https://github.com/airbytehq/airbyte/pull/48470/files#diff-3249d7445228172f9b36422eb8685d1b2def3c8953331f8d393756c64d9be7e9L285-L388