mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
Merge https://github.com/google/adk-python/pull/3932 ## Summary Upgrade GitHub Actions to their latest versions to ensure compatibility with Node 24, as Node 20 will reach end-of-life in April 2026. ## Changes | Action | Old Version(s) | New Version | Release | Files | |--------|---------------|-------------|---------|-------| | `actions/checkout` | [`v5`](https://github.com/actions/checkout/releases/tag/v5) | [`v6`](https://github.com/actions/checkout/releases/tag/v6) | [Release](https://github.com/actions/checkout/releases/tag/v6) | analyze-releases-for-adk-docs-updates.yml, check-file-contents.yml, discussion_answering.yml, isort.yml, pr-triage.yml, pyink.yml, python-unit-tests.yml, stale-bot.yml, triage.yml, upload-adk-docs-to-vertex-ai-search.yml | ## Context Per [GitHub's announcement](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/), Node 20 is being deprecated and runners will begin using Node 24 by default starting March 4th, 2026. ### Why this matters - **Node 20 EOL**: April 2026 - **Node 24 default**: March 4th, 2026 - **Action**: Update to latest action versions that support Node 24 ### Security Note Actions that were previously pinned to commit SHAs remain pinned to SHAs (updated to the latest release SHA) to maintain the security benefits of immutable references. ### Testing These changes only affect CI/CD workflow configurations and should not impact application functionality. The workflows should be tested by running them on a branch before merging. Co-authored-by: Xiang (Sean) Zhou <seanzhougoogle@google.com> COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3932 from salmanmkc:upgrade-github-actions-node24 0ffbb0b7b5f63d27583f8c24781f2d3ca92c0c23 PiperOrigin-RevId: 845813166
55 lines
1.8 KiB
YAML
55 lines
1.8 KiB
YAML
name: ADK Answering Agent for Discussions
|
|
|
|
on:
|
|
discussion:
|
|
types: [created]
|
|
discussion_comment:
|
|
types: [created]
|
|
|
|
jobs:
|
|
agent-answer-questions:
|
|
if: >-
|
|
(github.event_name == 'discussion' && github.event.discussion.category.name == 'Q&A') ||
|
|
(github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@adk-bot') && github.event.sender.login != 'adk-bot')
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Authenticate to Google Cloud
|
|
id: auth
|
|
uses: 'google-github-actions/auth@v3'
|
|
with:
|
|
credentials_json: '${{ secrets.ADK_GCP_SA_KEY }}'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install google-adk google-cloud-discoveryengine
|
|
|
|
- name: Run Answering Script
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }}
|
|
ADK_GCP_SA_KEY: ${{ secrets.ADK_GCP_SA_KEY }}
|
|
GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
|
|
GOOGLE_CLOUD_LOCATION: ${{ secrets.GOOGLE_CLOUD_LOCATION }}
|
|
VERTEXAI_DATASTORE_ID: ${{ secrets.VERTEXAI_DATASTORE_ID }}
|
|
GEMINI_API_DATASTORE_ID: ${{ secrets.GEMINI_API_DATASTORE_ID }}
|
|
GOOGLE_GENAI_USE_VERTEXAI: 1
|
|
OWNER: 'google'
|
|
REPO: 'adk-python'
|
|
INTERACTIVE: 0
|
|
PYTHONPATH: contributing/samples
|
|
run: |
|
|
# Write discussion data to temporary file to avoid secret masking issues
|
|
cat > /tmp/discussion.json << 'EOF'
|
|
${{ toJson(github.event.discussion) }}
|
|
EOF
|
|
python -m adk_answering_agent.main --discussion-file /tmp/discussion.json
|