From 8dc0c949afb9024738ff7ac1b2c19282175c3200 Mon Sep 17 00:00:00 2001 From: Xuan Yang Date: Tue, 5 Aug 2025 16:06:38 -0700 Subject: [PATCH] chore: add Github workflow config for the ADK Answering agent PiperOrigin-RevId: 791407331 --- .github/workflows/discussion_answering.yml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/discussion_answering.yml diff --git a/.github/workflows/discussion_answering.yml b/.github/workflows/discussion_answering.yml new file mode 100644 index 00000000..03429327 --- /dev/null +++ b/.github/workflows/discussion_answering.yml @@ -0,0 +1,43 @@ +on: + discussion: + types: [created] + discussion_comment: + types: [created] + +jobs: + agent-answer-questions: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Authenticate to Google Cloud + id: auth + uses: 'google-github-actions/auth@v2' + with: + credentials_json: '${{ secrets.ADK_GCP_SA_KEY }}' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install google-adk + + - name: Run Answering Script + env: + GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }} + GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }} + GOOGLE_CLOUD_LOCATION: ${{ secrets.GOOGLE_CLOUD_LOCATION }} + VERTEXAI_DATASTORE_ID: ${{ secrets.VERTEXAI_DATASTORE_ID }} + GOOGLE_GENAI_USE_VERTEXAI: 1 + OWNER: 'google' + REPO: 'adk-python' + INTERACTIVE: 0 + DISCUSSION_NUMBER: ${{ github.event.discussion.number }} + PYTHONPATH: contributing/samples + run: python -m adk_answering_agent.main