Repository navigation
fix(ci): add repository check to prevent workflows from running on forks - #5391
Wu-Jiayang wants to merge 9 commits into
Conversation
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.
|
Response from ADK Triaging Agent Hello @Wu-Jiayang, thank you for creating this PR! Could you please include a This information will help reviewers to review your PR more efficiently. Thanks! |
|
Hi @adk-bot, I've added a Testing Plan section to the PR description. Please take a look, thanks! |
…fix/workflow-fork-protection
…Jiayang/adk-python into fix/workflow-fork-protection
|
Hi @Wu-Jiayang , Thank you for your contribution! We appreciate you taking the time to submit this pull request. You could manually disable the workflows on your fork. |
|
I’ve already disabled it in my own fork, but I still think it should be handled via a PR for consistency, since the other workflows are checked as well. @rohityan |
|
Hi @Jacksunwei , can you please review this. LGTM |
…fix/workflow-fork-protection
The unquoted colon in the workflow's `name` field made the YAML unparseable: GitHub Actions rejected the file with "mapping values are not allowed here" and produced a run with zero jobs, while pre-commit's `check-yaml` hook failed with the same error on push. Wrapping the value in double quotes lets both parsers accept the file.
|
@wyf7107 I found a bug from you and fixed it. |
Merge #5391 ## 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 Co-authored-by: George Weale <gweale@google.com> COPYBARA_INTEGRATE_REVIEW=#5391 from Wu-Jiayang:fix/workflow-fork-protection 6601a67 PiperOrigin-RevId: 931242443
|
Thank you @Wu-Jiayang for your contribution! 🎉 Your changes have been successfully imported and merged via Copybara in commit 90bd38f. Closing this PR as the changes are now in the main branch. |
Merge google#5391 ## 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 Co-authored-by: George Weale <gweale@google.com> COPYBARA_INTEGRATE_REVIEW=google#5391 from Wu-Jiayang:fix/workflow-fork-protection 6601a67 PiperOrigin-RevId: 931242443
Summary
if: github.repository == 'google/adk-python'guard to 3 workflows that lack this protection: v2-sync, issue-monitor, and copybara-pr-handlerContext
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