question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extend "on" with possibility to ignore forks (run only for the original repo)

See original GitHub issue

Describe the enhancement Enhancement of the on directive to tigger a workflow only for the original repo, not a fork of it.

Code Snippet One idea:

on:
  push:
    repositories:
      - 'quarkusio/quarkus'

or more specifically (but less flexible):

on:
  push:
    ignore-forks: true

or similar.

Additional information

There are a couple of workflows over at https://github.com/quarkusio/quarkus which just don’t make sense to run for forks.

Right now those workflows are using per job:

  linux-jvm-tests:
    name: JVM Tests - JDK ${{matrix.java.name}}
    runs-on: ubuntu-latest
    # Skip master in forks
    if: "github.repository == 'quarkusio/quarkus'

This is rather verbose and easy to forget for workflows consisting of multiple jobs. Furthermore, it results in many skipped actions entries in forks, e.g. “Cleanup Duplicate CI Runs” here: https://github.com/famod/quarkus/actions

Disabling actions in forks is not an option for Quarkus, since Quarkus contributors are asked to wait for CI in their forks before creating PRs.

PS: Not sure this is the right report for syntax enhancements. 🤔 If not, please point me in the right direction. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:22
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
hellwolfcommented, Aug 13, 2021

I would love this feature for our project.

0reactions
round-corgicommented, Feb 3, 2023

We run many workflows internally via private forks, where the pipeline only gets executed on pull request or on push to master.

We’d love this functionality as well.

As it stands, job-specific conditional for github.repository or github.repository_owner will prevent the job itself from running. However, if someone updates their fork from master, the pipeline still executes and then fails to run, which has been annoying the devs since our move to Actions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow fork pipelines to run in parent project (&3278) · Epics
In parent project, there is a project-level config (Settings > CI/CD > General pipelines) called "Allow MRs/PRs from forked projects to create pipelines...
Read more >
github - Git fork always commits ahead I don't want
The mostly here is just because it's possible for whoever had the original repository to remove it. When this happens, GitHub pass "fork...
Read more >
Exclude user forks from code search results | Bitbucket ...
Filtering by forks is something we are currently looking at and plan to release Bitbucket Server 4.14 with fork:true (include results only from...
Read more >
Fork - a fast and friendly git client for Mac and Windows
Reworked repository manager. Ability to rescan repositories. New. Automatically create folder structure in repo manager. Improved.
Read more >
Set up a Git repository | PyCharm Documentation
Clicking Cancel in the confirmation dialog only cancels force adding ignored files - all other files will be added to the Git repository....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found