Skip to content
Merged
Show file tree
Hide file tree
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
208 changes: 0 additions & 208 deletions .github/workflows/daily-sdk-update.yml

This file was deleted.

53 changes: 42 additions & 11 deletions .github/workflows/sdk-version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ jobs:

- name: Check for SDK updates
id: check
env:
PACKAGE_ARG: ${{ inputs.package || 'all' }}
run: |
PACKAGE_ARG="${{ inputs.package || 'all' }}"
python scripts/sdk-version-bump.py --check-only --package "$PACKAGE_ARG"
EXIT_CODE=$?

Expand Down Expand Up @@ -90,16 +91,36 @@ jobs:
- name: Apply updates
if: steps.check.outputs.updates_available == 'true'
id: apply
env:
PACKAGE_ARG: ${{ inputs.package || 'all' }}
run: |
PACKAGE_ARG="${{ inputs.package || 'all' }}"
python scripts/sdk-version-bump.py --package "$PACKAGE_ARG"

# Read outputs
PR_TITLE=$(cat .sdk-bump-output/pr-title.txt)
echo "pr_title=$PR_TITLE" >> "$GITHUB_OUTPUT"

- name: Check for SDK options drift
if: steps.check.outputs.updates_available == 'true'
id: drift
run: |
pip install claude-agent-sdk
EXIT_CODE=0
python scripts/sdk-options-drift-check.py || EXIT_CODE=$?
echo "drift_exit=$EXIT_CODE" >> "$GITHUB_OUTPUT"
if [ "$EXIT_CODE" -eq 2 ]; then
echo "::warning::SDK options drift check encountered an error"
elif [ "$EXIT_CODE" -eq 1 ]; then
echo "SDK options drift detected — manifest updated"
fi

- name: Create or update PR
if: steps.check.outputs.updates_available == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_TITLE: ${{ steps.apply.outputs.pr_title }}
PR_EXISTS: ${{ steps.existing_pr.outputs.pr_exists }}
PR_NUMBER: ${{ steps.existing_pr.outputs.pr_number }}
run: |
# Configure git
git config user.name "github-actions[bot]"
Expand All @@ -114,9 +135,20 @@ jobs:
git add components/runners/ambient-runner/pyproject.toml
git add components/runners/ambient-runner/uv.lock

# Include manifest if drift was detected
if [ -n "$(git diff -- components/runners/ambient-runner/sdk-options-manifest.json)" ]; then
git add components/runners/ambient-runner/sdk-options-manifest.json
{
echo ""
echo "## SDK Options Drift"
echo ""
echo "ClaudeAgentOptions fields changed — sdk-options-manifest.json updated."
echo "Review backend allowlist and frontend schema for new/removed fields."
} >> .sdk-bump-output/pr-body.md
fi

# Commit
PR_TITLE="${{ steps.apply.outputs.pr_title }}"
git commit -m "$PR_TITLE
git commit -m "${PR_TITLE}

Automated SDK version bump.

Expand All @@ -126,12 +158,11 @@ jobs:
git push --force origin "$BRANCH"

# Create or update PR (use --body-file to avoid arg length limits)
if [ "${{ steps.existing_pr.outputs.pr_exists }}" == "true" ]; then
PR_NUM="${{ steps.existing_pr.outputs.pr_number }}"
gh pr edit "$PR_NUM" \
if [ "$PR_EXISTS" == "true" ]; then
gh pr edit "$PR_NUMBER" \
--title "$PR_TITLE" \
--body-file .sdk-bump-output/pr-body.md
echo "Updated existing PR #$PR_NUM"
echo "Updated existing PR #$PR_NUMBER"
else
gh pr create \
--title "$PR_TITLE" \
Expand All @@ -141,13 +172,13 @@ jobs:
--label "dependencies,automated"
echo "Created new PR"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Summary
if: always()
env:
UPDATES_AVAILABLE: ${{ steps.check.outputs.updates_available }}
run: |
if [ "${{ steps.check.outputs.updates_available }}" == "true" ]; then
if [ "$UPDATES_AVAILABLE" == "true" ]; then
{
echo "## SDK Version Bump"
echo "Updates applied and PR created/updated."
Expand Down
Loading
Loading