Fix automated maintenance workflows failing on repository forks #6754
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.
Problem
Contributors working on forks of the
nextcloud/all-in-onerepository were experiencing workflow failures with errors like "dependency-updates: All jobs were cancelled". This was happening because several automated maintenance workflows designed for the main repository were attempting to run on forks, where they would inevitably fail due to permission restrictions.Root Cause
Seven automated workflows were running on all repositories (including forks) but were designed to perform maintainer-level tasks that only make sense in the context of the main repository:
When these workflows run on forks, they fail because:
GITHUB_TOKEN,COMMAND_BOT_PAT) may not be availableSolution
Added
if: github.repository == 'nextcloud/all-in-one'conditions to all automated maintenance workflows to ensure they only run on the main repository. This is a common pattern in open-source projects to prevent unnecessary workflow runs on forks.Workflows Updated:
dependency-updates.yml- PHP dependency updatesnextcloud-update.yml- Nextcloud container updatesupdate-yaml.yml- YAML file updatesimaginary-update.yml- Imaginary container updatespsalm-update-baseline.yml- Psalm baseline updatestalk.yml- Talk container updatesupdate-helm.yml- Helm chart updatesImpact
✅ Contributors: No more cancellation errors when working on forks
✅ Validation workflows: Continue to run normally on forks (linting, testing, etc.)
✅ Main repository: All automated maintenance continues to work perfectly
✅ Performance: Reduced unnecessary workflow runs across the fork ecosystem
This change is purely additive - no functionality is removed, and the fix prevents workflow failures that were confusing for contributors while maintaining all existing automation for maintainers.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.