Skip to content

[CI] Skip some workflows on forked repositories#78713

Merged
SigureMo merged 2 commits intoPaddlePaddle:developfrom
ooooo-create:add_fork_repo_limit_for_workflow
Apr 19, 2026
Merged

[CI] Skip some workflows on forked repositories#78713
SigureMo merged 2 commits intoPaddlePaddle:developfrom
ooooo-create:add_fork_repo_limit_for_workflow

Conversation

@ooooo-create
Copy link
Copy Markdown
Contributor

PR Category

Environment Adaptation

PR Types

Others

Description

  • .github/workflows/Coverage.yml 流水线需要机器,在第一个 job 进行判断
  • .github/workflows/CheckPRTemplate.yml 也是需要机器,同样第一个 job 判断跳过
  • .github/workflows/Approval.yml 作为主仓库的 approve,在 fork 仓库作用不大,也加上了判断

是否引起精度变化

Signed-off-by: ooooo <3164076421@qq.com>
Copilot AI review requested due to automatic review settings April 18, 2026 07:38
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 18, 2026

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several GitHub Actions workflows to skip running resource-consuming jobs when the workflows execute in non-PaddlePaddle (forked) repositories, reducing unnecessary CI usage on forks while keeping behavior unchanged for the upstream repo.

Changes:

  • Add a repository-owner gate to the first job in Coverage.yml to prevent the coverage pipeline from running on forks.
  • Gate the reusable check-bypass job in CheckPRTemplate.yml and Approval.yml so the dependent jobs are skipped on forks.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/Coverage.yml Adds job-level condition to skip the initial “check file paths” job on forks, which cascades to skip the workflow.
.github/workflows/CheckPRTemplate.yml Gates the check-bypass reusable-workflow job to avoid running the template check workflow on forks.
.github/workflows/Approval.yml Gates the check-bypass reusable-workflow job to avoid running approval checks on forks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ooooo-create ooooo-create requested a review from SigureMo April 18, 2026 12:45
Copy link
Copy Markdown
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前确定其他流水线没有需要补充的了吗?

以及,确定跳过 check-bypass 能正确跳过后续流水线吗?

@ooooo-create
Copy link
Copy Markdown
Contributor Author

目前确定其他流水线没有需要补充的了吗?

(非 Agent 回复)还发现两个使用 pull_request_target 触发的工作流(remove-skip-ci-labels.ymlcherry-pick.yml),加上了限制

以及,确定跳过 check-bypass 能正确跳过后续流水线吗?

(非 Agent 回复)是的,确认了,跳过前置的任务,后续依赖它的任务也会跳过,在 https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-jobs#defining-prerequisite-jobs 中看见

@ooooo-create
Copy link
Copy Markdown
Contributor Author

coverage test 有毒啊

@SigureMo SigureMo merged commit 30baea4 into PaddlePaddle:develop Apr 19, 2026
147 of 154 checks passed
@ooooo-create ooooo-create added the HappyOpenSource 快乐开源活动issue与PR label Apr 20, 2026
@ooooo-create ooooo-create deleted the add_fork_repo_limit_for_workflow branch April 20, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants