Skip to content

fix(ci): add repository check to prevent workflows from running on forks#5391

Open
Wu-Jiayang wants to merge 1 commit intogoogle:mainfrom
Wu-Jiayang:fix/workflow-fork-protection
Open

fix(ci): add repository check to prevent workflows from running on forks#5391
Wu-Jiayang wants to merge 1 commit intogoogle:mainfrom
Wu-Jiayang:fix/workflow-fork-protection

Conversation

@Wu-Jiayang
Copy link
Copy Markdown

@Wu-Jiayang Wu-Jiayang commented Apr 19, 2026

Summary

  • Add if: github.repository == 'google/adk-python' guard to 3 workflows that lack this protection: v2-sync, issue-monitor, and copybara-pr-handler
  • These workflows use secrets unavailable on forks (RELEASE_PAT, ADK_TRIAGE_AGENT, GOOGLE_API_KEY), causing daily failures on forks

Context

Other scheduled/repo-specific workflows (triage.yml, stale-bot.yml, upload-adk-docs-to-vertex-ai-search.yml) already have this guard. These 3 were missing it, causing errors on forks every day.

Testing Plan

  • Verified that the added condition matches the existing pattern used in triage.yml, stale-bot.yml, and upload-adk-docs-to-vertex-ai-search.yml
  • On forks, the job will be skipped (same behavior as the already-protected workflows)
  • On google/adk-python, the workflows will continue to run as before since the condition evaluates to true

Add if: github.repository == 'google/adk-python' guard to workflows
that lack this protection: v2-sync, issue-monitor, and copybara-pr-handler.
These workflows use secrets unavailable on forks, causing daily failures.
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Apr 19, 2026

Response from ADK Triaging Agent

Hello @Wu-Jiayang, thank you for creating this PR!

Could you please include a testing plan section in your PR to describe how you tested these changes?

This information will help reviewers to review your PR more efficiently. Thanks!

@adk-bot adk-bot added the tools [Component] This issue is related to tools label Apr 19, 2026
@Wu-Jiayang
Copy link
Copy Markdown
Author

Hi @adk-bot, I've added a Testing Plan section to the PR description. Please take a look, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants