Skip to content

Commit ac7b90a

Browse files
committed
chore(ci): Sync GitHub workflows from main branch to v1
The v1 branch workflows are behind main, missing recent CI checks, dependency bumps, and workflow fixes. Synced .github/workflows/ from main to v1 while keeping v1 release-please configuration intact.
1 parent e72bf9b commit ac7b90a

21 files changed

Lines changed: 420 additions & 31 deletions

.github/workflows/analyze-releases-for-adk-docs-updates.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: Analyze New Release for ADK Docs Updates
216

317
on:
@@ -45,14 +59,16 @@ jobs:
4559
- name: Install dependencies
4660
run: |
4761
python -m pip install --upgrade pip
48-
pip install requests google-adk
62+
pip install requests "google-adk[db]"
4963
5064
- name: Restore session DB from cache
5165
if: ${{ github.event.inputs.resume == 'true' }}
5266
uses: actions/cache/restore@v4
5367
with:
54-
path: contributing/samples/adk_documentation/adk_release_analyzer/sessions.db
55-
key: analyzer-session-db
68+
path: contributing/samples/adk_team/adk_documentation/adk_release_analyzer/sessions.db
69+
key: analyzer-session-db-${{ github.run_id }}-${{ github.run_attempt }}
70+
restore-keys: |
71+
analyzer-session-db-
5672
5773
- name: Run Analyzing Script
5874
env:
@@ -64,16 +80,28 @@ jobs:
6480
DOC_REPO: 'adk-docs'
6581
CODE_REPO: 'adk-python'
6682
INTERACTIVE: 0
67-
PYTHONPATH: contributing/samples/adk_documentation
68-
run: >-
69-
python -m adk_release_analyzer.main
70-
${{ github.event.inputs.resume == 'true' && '--resume' || '' }}
71-
${{ github.event.inputs.start_tag && format('--start-tag {0}', github.event.inputs.start_tag) || '' }}
72-
${{ github.event.inputs.end_tag && format('--end-tag {0}', github.event.inputs.end_tag) || '' }}
83+
PYTHONPATH: contributing/samples/adk_team
84+
ANALYZER_RESUME: ${{ github.event.inputs.resume }}
85+
ANALYZER_START_TAG: ${{ github.event.inputs.start_tag }}
86+
ANALYZER_END_TAG: ${{ github.event.inputs.end_tag }}
87+
shell: bash
88+
run: |
89+
set -euo pipefail
90+
args=()
91+
if [[ "${ANALYZER_RESUME:-false}" == "true" ]]; then
92+
args+=(--resume)
93+
fi
94+
if [[ -n "${ANALYZER_START_TAG:-}" ]]; then
95+
args+=(--start-tag "$ANALYZER_START_TAG")
96+
fi
97+
if [[ -n "${ANALYZER_END_TAG:-}" ]]; then
98+
args+=(--end-tag "$ANALYZER_END_TAG")
99+
fi
100+
python -m adk_documentation.adk_release_analyzer.main "${args[@]}"
73101
74102
- name: Save session DB to cache
75103
if: always()
76104
uses: actions/cache/save@v4
77105
with:
78-
path: contributing/samples/adk_documentation/adk_release_analyzer/sessions.db
79-
key: analyzer-session-db
106+
path: contributing/samples/adk_team/adk_documentation/adk_release_analyzer/sessions.db
107+
key: analyzer-session-db-${{ github.run_id }}-${{ github.run_attempt }}

.github/workflows/block-merge.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Do Not Merge on GitHub
16+
17+
on:
18+
pull_request:
19+
types: [opened, reopened, synchronize]
20+
21+
jobs:
22+
block-merge:
23+
name: maintainers will submit via Copybara
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Explain why merging is blocked
27+
run: |
28+
echo "::error title=GitHub merge is disabled::Do NOT merge this pull request on GitHub. A maintainer will land the change internally, and Copybara will sync it back to this repository automatically."
29+
exit 1

.github/workflows/copybara-pr-handler.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: Copybara PR Handler
216

317
on:
@@ -17,6 +31,7 @@ on:
1731

1832
jobs:
1933
close-imported-pr:
34+
if: github.repository == 'google/adk-python'
2035
runs-on: ubuntu-latest
2136
permissions:
2237
pull-requests: write
@@ -57,15 +72,21 @@ jobs:
5772
console.log(`\n--- Processing commit ${sha.substring(0, 7)} ---`);
5873
console.log(`Committer: ${committer}`);
5974
60-
// Check if this is a Copybara commit
61-
if (committer !== 'Copybara-Service') {
75+
// Check if this is a Copybara commit or has a pull request reference
76+
const prRegex = /Merges?:?\s+(?:https:\/\/github\.com\/google\/adk-python\/pull\/|#)(\d+)/i;
77+
const isCopybara = committer === 'Copybara-Service' ||
78+
commit.author?.email === 'genai-sdk-bot@google.com' ||
79+
message.includes('GitOrigin-RevId:') ||
80+
message.includes('PiperOrigin-RevId:') ||
81+
prRegex.test(message);
82+
83+
if (!isCopybara) {
6284
console.log('Not a Copybara commit, skipping');
6385
continue;
6486
}
6587
6688
// Extract PR number from commit message
67-
// Pattern: "Merge https://github.com/google/adk-python/pull/3333"
68-
const prMatch = message.match(/Merge https:\/\/github\.com\/google\/adk-python\/pull\/(\d+)/);
89+
const prMatch = message.match(prRegex);
6990
7091
if (!prMatch) {
7192
console.log('No PR number found in Copybara commit message');
@@ -113,6 +134,14 @@ jobs:
113134
body: `Thank you @${author} for your contribution! 🎉\n\nYour changes have been successfully imported and merged via Copybara in commit ${commitSha}.\n\nClosing this PR as the changes are now in the main branch.`
114135
});
115136
137+
// Add 'merged' label to the PR
138+
await github.rest.issues.addLabels({
139+
owner: context.repo.owner,
140+
repo: context.repo.repo,
141+
issue_number: prNumber,
142+
labels: ['merged']
143+
});
144+
116145
// Close the PR
117146
await github.rest.pulls.update({
118147
owner: context.repo.owner,

.github/workflows/discussion_answering.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: ADK Answering Agent for Discussions
216

317
on:
@@ -48,7 +62,7 @@ jobs:
4862
OWNER: 'google'
4963
REPO: 'adk-python'
5064
INTERACTIVE: 0
51-
PYTHONPATH: contributing/samples
65+
PYTHONPATH: contributing/samples/adk_team
5266
run: |
5367
# Write discussion data to temporary file to avoid secret masking issues
5468
cat > /tmp/discussion.json << 'EOF'

.github/workflows/issue-monitor.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030

3131
jobs:
3232
sweep-spam:
33+
if: github.repository == 'google/adk-python'
3334
runs-on: ubuntu-latest
3435
timeout-minutes: 120
3536
permissions:
@@ -58,6 +59,6 @@ jobs:
5859
REPO: ${{ github.event.repository.name }}
5960
CONCURRENCY_LIMIT: 3
6061
INITIAL_FULL_SCAN: ${{ github.event.inputs.full_scan == 'true' }}
61-
LLM_MODEL_NAME: "gemini-2.5-flash"
62-
PYTHONPATH: contributing/samples
62+
LLM_MODEL_NAME: "gemini-3.5-flash"
63+
PYTHONPATH: contributing/samples/adk_team
6364
run: python -m adk_issue_monitoring_agent.main

.github/workflows/mypy.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: Mypy Type Check
216

317
on:

.github/workflows/pr-triage.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
name: ADK Pull Request Triaging Agent
216

317
on:
@@ -12,7 +26,11 @@ on:
1226

1327
jobs:
1428
agent-triage-pull-request:
15-
if: github.event_name == 'workflow_dispatch' || !contains(github.event.pull_request.labels.*.name, 'google-contributor')
29+
if: >-
30+
github.event_name == 'workflow_dispatch' || (
31+
github.event.pull_request.head.repo.full_name == github.repository &&
32+
!contains(github.event.pull_request.labels.*.name, 'google-contributor')
33+
)
1634
runs-on: ubuntu-latest
1735
permissions:
1836
pull-requests: write
@@ -41,5 +59,5 @@ jobs:
4159
REPO: 'adk-python'
4260
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number || github.event.inputs.pr_number }}
4361
INTERACTIVE: ${{ vars.PR_TRIAGE_INTERACTIVE }}
44-
PYTHONPATH: contributing/samples
62+
PYTHONPATH: contributing/samples/adk_team
4563
run: python -m adk_pr_triaging_agent.main

.github/workflows/release-cherry-pick.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
# Step 3 (optional): Cherry-picks a commit from main to the release/candidate branch.
216
# Use between step 1 and step 4 to include bug fixes in an in-progress release.
317
# Note: Does NOT auto-trigger release-please to preserve manual changelog edits.

.github/workflows/release-cut.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
# Step 1: Starts the release process by creating a release/candidate branch.
216
# Generates a changelog PR for review (step 2).
317
name: "Release: Cut"

.github/workflows/release-finalize.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
# Step 4: Triggers when the changelog PR is merged to release/candidate.
216
# Records last-release-sha and renames release/candidate to release/v{version}.
317
name: "Release: Finalize"

0 commit comments

Comments
 (0)