Skip to content

Conversation

@HumorBaby
Copy link
Contributor

Description

As of right now, the GitHub Actions CI workflow will run on forks too.
This PR checks the workflow context to see if events are for the 'sopel-irc' owner, and only runs jobs if so. This check can/should be moved/updated as new jobs are defined, or if the event/branch filter for the CI workflow changes.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches1

1As best as possible. Confirmed that adding this prevents from running on my fork.

@dgw
Copy link
Member

dgw commented May 30, 2021

You don't think needs: tests will block the Coveralls finisher from running without a condition?

Presumably the pypi.yml workflow will fail because of the missing secret, but maybe it should also have this condition.

I can't believe there's no way to specify a condition for an entire workflow… Putting it on every job is ridiculous.

@dgw dgw added the Build label May 30, 2021
@dgw dgw added this to the 8.0.0 milestone May 30, 2021
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

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

Really, I just want to merge this and further refine it later if needed. My question(s) above can be answered regardless of whether the PR remains unmerged. 😄

@dgw dgw merged commit 16f26e6 into sopel-irc:master May 30, 2021
@dgw
Copy link
Member

dgw commented May 30, 2021

Update: Workflow runs are still created on a fork; they just immediately skip the job. Better than before, though still not ideal.

A true fix probably would have to come from the GitHub Actions team modifying this (asinine) default behavior to be more like a typical CI service—most of which seem to simply ignore forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants