Skip to content

[Bug] Github workflows run on forked repos #10467

@comaniac

Description

@comaniac

Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first 😸

Issues that are inactive for a period of time may get closed. We adopt this policy so that we won't lose track of actionable issues that may fall at the bottom of the pile. Feel free to reopen a new one if you feel there is an additional problem that needs attention when an old one gets closed.

Expected behavior

The forked repo should not trigger Github action workflows.

Actual behavior

The scheduled workflows, ping reviewer and update last-success branch, are triggered every day on my forked repo. This results in two annoying facts: 1) a last-success branch has been created on my forked repo, and 2) I might receive an email about execution failures.

Environment

N/A

Steps to reproduce

Any forked repo with up-to-date main branch should experience this. Here is mine: https://github.com/comaniac/tvm/actions

What I did in other repos is to add a guard to make sure certain workflows (e.g., all scheduled ones) only execute on the upstream repo. Something like:

  job_test:
    if: github.repository == 'my-account/repo-name' # e.g., apache/tvm
    runs-on: ubuntu-latest
    steps:

cc @driazati @areusch

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions