Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2025 Google LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Analyze New Release for ADK Docs Updates | |
| on: | |
| # Runs on every new release. | |
| release: | |
| types: [published] | |
| # Manual trigger for testing and retrying. | |
| workflow_dispatch: | |
| inputs: | |
| resume: | |
| description: 'Resume from the last failed/interrupted run' | |
| required: false | |
| type: boolean | |
| default: false | |
| start_tag: | |
| description: 'Older release tag (base), e.g. v1.26.0' | |
| required: false | |
| type: string | |
| end_tag: | |
| description: 'Newer release tag (head), e.g. v1.27.0' | |
| required: false | |
| type: string | |
| jobs: | |
| analyze-new-release-for-adk-docs-updates: | |
| if: github.repository == 'google/adk-python' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Load adk-bot SSH Private Key | |
| uses: webfactory/ssh-agent@v0.9.1 | |
| with: | |
| ssh-private-key: ${{ secrets.ADK_BOT_SSH_PRIVATE_KEY }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests "google-adk[db]" | |
| - name: Restore session DB from cache | |
| if: ${{ github.event.inputs.resume == 'true' }} | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: contributing/samples/adk_team/adk_documentation/adk_release_analyzer/sessions.db | |
| key: analyzer-session-db-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| analyzer-session-db- | |
| - name: Run Analyzing Script | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }} | |
| GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY_FOR_DOCS_AGENTS }} | |
| GOOGLE_GENAI_USE_VERTEXAI: 0 | |
| DOC_OWNER: 'google' | |
| CODE_OWNER: 'google' | |
| DOC_REPO: 'adk-docs' | |
| CODE_REPO: 'adk-python' | |
| INTERACTIVE: 0 | |
| PYTHONPATH: contributing/samples/adk_team | |
| ANALYZER_RESUME: ${{ github.event.inputs.resume }} | |
| ANALYZER_START_TAG: ${{ github.event.inputs.start_tag }} | |
| ANALYZER_END_TAG: ${{ github.event.inputs.end_tag }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| args=() | |
| if [[ "${ANALYZER_RESUME:-false}" == "true" ]]; then | |
| args+=(--resume) | |
| fi | |
| if [[ -n "${ANALYZER_START_TAG:-}" ]]; then | |
| args+=(--start-tag "$ANALYZER_START_TAG") | |
| fi | |
| if [[ -n "${ANALYZER_END_TAG:-}" ]]; then | |
| args+=(--end-tag "$ANALYZER_END_TAG") | |
| fi | |
| python -m adk_documentation.adk_release_analyzer.main "${args[@]}" | |
| - name: Save session DB to cache | |
| if: always() | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: contributing/samples/adk_team/adk_documentation/adk_release_analyzer/sessions.db | |
| key: analyzer-session-db-${{ github.run_id }}-${{ github.run_attempt }} |