Skip to content

chore: add manual build trigger#2342

Open
SimenB wants to merge 1 commit into
mainfrom
manual-build-trigger
Open

chore: add manual build trigger#2342
SimenB wants to merge 1 commit into
mainfrom
manual-build-trigger

Conversation

@SimenB
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@MikeMcC399
Copy link
Copy Markdown
Contributor

The workflow is supposed to run every 15 minutes:

on:
schedule:
- cron: "*/15 * * * *"

In practice it seems that GitHub Actions is throttling the frequency or dropping queued jobs.

https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#schedule says:

The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. High load times include the start of every hour. If the load is sufficiently high enough, some queued jobs may be dropped. To decrease the chance of delay, schedule your workflow to run at a different time of the hour.

So it would be convenient to have a workflow_dispatch trigger here for occasions like now when you know there is a release pending, including musl build availability, and the the workflow has not picked it up yet.

@MikeMcC399
Copy link
Copy Markdown
Contributor

Actually I just realized that isn't necessary, since you can just re-run a previous job. (I just did that.)

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.

5 participants