Skip to content

Limit workflows to only run on the official repo to avoid forks unnecessary usage - #7262

Merged
jpelgrom merged 1 commit into
mainfrom
feature/limit_workflows_to_main_repo
Jul 27, 2026
Merged

Limit workflows to only run on the official repo to avoid forks unnecessary usage#7262
jpelgrom merged 1 commit into
mainfrom
feature/limit_workflows_to_main_repo

Conversation

@TimoPtr

@TimoPtr TimoPtr commented Jul 27, 2026

Copy link
Copy Markdown
Member

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

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.
  • I have read the Open Home Foundation AI Policy.

Select exactly one option that describes AI usage in this contribution:

  • I have not used AI for this contribution.
  • AI assistance was used for this contribution.
  • AI fully generated the code for this contribution, but I've reviewed and understood it before submitting and will respond without AI during review.

Copilot AI review requested due to automatic review settings July 27, 2026 16:10
@TimoPtr
TimoPtr requested a review from jpelgrom July 27, 2026 16:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 jpelgrom changed the title Limit workflows to only run on the official repo to avoid forks Limit workflows to only run on the official repo to avoid forks unnecessary usage Jul 27, 2026
@jpelgrom
jpelgrom merged commit e91cadc into main Jul 27, 2026
25 checks passed
@jpelgrom
jpelgrom deleted the feature/limit_workflows_to_main_repo branch July 27, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants