Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent workflows specific to this repo and its management from running on forks #3693

Closed
dhruvkb opened this issue Jan 23, 2024 · 1 comment · Fixed by #3773
Closed

Prevent workflows specific to this repo and its management from running on forks #3693

dhruvkb opened this issue Jan 23, 2024 · 1 comment · Fixed by #3773
Assignees
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations

Comments

@dhruvkb
Copy link
Member

dhruvkb commented Jan 23, 2024

Description

We have a number of workflows for managing the WordPress/openverse and WordPress/openverse-infrastructure repositories that only make sense to run on this repo. These workflows should not run on forks.

We can conditionally abort the workflow (by passing it, so that forks are not overrun with workflow failures) by comparing github.repository with the allowlisted names of the main/original/upstream repos.

Reproduction

This issue was raised by contributor @firatbezir in a discussion #3686.

Additional context

A good way to identify these workflows is to find workflows that run on a schedule. Most management workflows that shouldn't run on forks (like label/meta-files sync and reminders) run on a fixed schedule.

Contributors affected by this issue can completely disable GitHub Actions on their repo. This will not affect their ability to submit PRs as all necessary workflows for a PR to be merged will be run on the upstream repo once a PR is created.

Screenshot 2024-01-23 at 12 50 32 PM
@dhruvkb dhruvkb added 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 🤖 aspect: dx Concerns developers' experience with the codebase 🧱 stack: mgmt Related to repo management and automations good first issue New-contributor friendly help wanted Open to participation from the community labels Jan 23, 2024
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Jan 23, 2024
@AetherUnbound AetherUnbound moved this from 📋 Backlog to 📅 To Do in Openverse Backlog Jan 23, 2024
@AetherUnbound
Copy link
Collaborator

I think we could use github.repository_owner == 'WordPress' to cover all cases for this!

@AetherUnbound AetherUnbound self-assigned this Feb 8, 2024
@openverse-bot openverse-bot moved this from 📅 To Do to 🏗 In Progress in Openverse Backlog Feb 8, 2024
@openverse-bot openverse-bot moved this from 🏗 In Progress to ✅ Done in Openverse Backlog Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 aspect: dx Concerns developers' experience with the codebase 🛠 goal: fix Bug fix good first issue New-contributor friendly help wanted Open to participation from the community 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: mgmt Related to repo management and automations
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants