fix(ci): add repository check to prevent workflows from running on forks#5391
fix(ci): add repository check to prevent workflows from running on forks#5391Wu-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. |
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