Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/update-contact-center-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Update Contact Center SDK

on:
schedule:
- cron: "30 12 * * 3"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-sdk:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org
cache: yarn

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn install --immutable

- name: Update SDK
id: sdk
run: |
version="$(npm view @webex/contact-center@next version)"
echo "version=$version" >> "$GITHUB_OUTPUT"
yarn workspace @webex/cc-store add "@webex/contact-center@$version"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep generated SDK updates spec-current

Whenever the next tag advances, this command changes the store manifest and lockfile, but the generated branch never updates the exact SDK versions recorded in packages/contact-center/store/ai-docs/store-spec.md:51,97,473 or ai-docs/CONTRACTS.md:29. Every automated PR therefore immediately leaves the repository's contract/spec documentation claiming the old SDK; update those claims as part of the automation (or remove the version snapshots).

AGENTS.md reference: AGENTS.md:L68-L68

Useful? React with 👍 / 👎.

yarn workspace samples-cc-react-app add "@webex/contact-center@$version"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the umbrella Webex package aligned

Whenever the fetched version differs from 3.12.0-next.159, this advances the sample's direct dependency while leaving its exact webex@3.12.0-next.249 dependency unchanged; that umbrella package's lockfile manifest itself pins @webex/contact-center@3.12.0-next.159. The generated lockfile therefore installs two contact-center versions, contrary to the single-copy alignment documented in store-spec.md:473-476, so the corresponding umbrella release should be resolved and updated (or the update deferred until it embeds the selected contact-center build).

Useful? React with 👍 / 👎.


- name: Validate SDK update
run: |
yarn workspace @webex/cc-store test:unit
yarn workspace @webex/cc-store build
yarn workspace samples-cc-react-app build
Comment on lines +43 to +45

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Build workspace dependencies before validation

On every fresh scheduled runner, this block runs the store test before any topological workspace build. test:unit type-checks imports from @webex/test-fixtures, and both that package and the sample's @webex/cc-* imports point at untracked dist/type outputs, so yarn install alone leaves the first tsc with unresolved modules and the create-PR step is never reached. Run yarn build:dev (or equivalent topological builds) before these checks.

AGENTS.md reference: AGENTS.md:L84-L85

Useful? React with 👍 / 👎.


- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use a token that triggers pull-request CI

For a PR opened with the repository GITHUB_TOKEN, GitHub suppresses workflow events generated by that token. The full CI in .github/workflows/pull-request.yml:4-7 listens only for pull_request_target opened/labeled/reopened events, so neither this PR creation nor its labels starts the lint and full unit-test jobs, leaving the dependency PR with only this workflow's partial validation. Use a GitHub App or PAT token that is allowed to trigger the PR workflow.

Useful? React with 👍 / 👎.

branch: automation/update-contact-center-sdk
delete-branch: true
title: "chore(cc): update contact center SDK to ${{ steps.sdk.outputs.version }}"
commit-message: "chore(cc): update contact center SDK to ${{ steps.sdk.outputs.version }}"
body: |
Automated weekly update of `@webex/contact-center` from the npm `next` dist-tag.

SDK version: `${{ steps.sdk.outputs.version }}`
labels: dependencies,contact-center
Loading