Skip to content

Conversation

@SimenB
Copy link
Member

@SimenB SimenB commented Jan 14, 2026

Description

Allowing us to manually trigger a run of the update job

Motivation and Context

Staring at
image
due to #2341 (comment)

Testing Details

Example Output(if appropriate)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

This comment was marked as spam.

Copy link
Member

@PeterDaveHello PeterDaveHello left a comment

Choose a reason for hiding this comment

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

Maybe we should extend jobs.build.if to ensure the workflow only runs on main when triggered via workflow_dispatch?

This helps avoid running repo scripts + secrets from a non-main branch.
 
Currently it's if: github.repository_owner == 'nodejs', we could change it to:
 

jobs:
  build:
    if: github.repository_owner == 'nodejs' && github.ref_name == 'main'

@nschonni

This comment was marked as outdated.

@PeterDaveHello
Copy link
Member

@nschonni You're right that schedule only runs on the default branch, but workflow_dispatch can be triggered on a selected ref (branch/tag). This may lead to executing repo scripts from a non-main ref in a context where secrets are available, so extending the if guard to main could be a sensible security step.

@PeterDaveHello
Copy link
Member

By the way, with workflow_dispatch added, this workflow would also be runnable manually alongside the existing schedule. Adding concurrency could help prevent overlapping runs racing on the same updates (e.g., duplicate PRs or conflicting pushes).

concurrency:
  group: automatic-updates
  cancel-in-progress: false

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants