Limit workflows to only run on the official repo to avoid forks unnecessary usage - #7262
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces unnecessary GitHub Actions usage on forked repositories by gating several resource- and permission-heavy workflows to only execute on the official home-assistant/android repository.
Changes:
- Add job-level
if: github.repository == 'home-assistant/android'guards to scheduled/tagging workflows (weekly/monthly). - Add the same repository guard to release/publishing workflows (onPush + release).
- Prevent the “restrict task creation” automation from running on forks.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/weekly.yml | Gate the weekly tagging job to only run on home-assistant/android. |
| .github/workflows/monthly.yml | Gate the monthly version bump job to only run on home-assistant/android. |
| .github/workflows/onPush.yml | Gate release/publish jobs so they don’t execute on forks. |
| .github/workflows/release.yml | Gate production promotion job to only run on home-assistant/android. |
| .github/workflows/renovate-lockfiles.yml | Gate renovate lockfile update job to only run on home-assistant/android. |
| .github/workflows/restrict-task-creation.yml | Gate the issue automation job to only run on home-assistant/android. |
jpelgrom
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
I had some forks cloned locally and I noticed that some forks where running some workflows like the weekly workflow. It doesn't make sense and waste resources. On top of that the contributors might not even know that it runs there.
Checklist
Select exactly one option that describes AI usage in this contribution: