actions / setup-node

Set up your GitHub Actions workflow with a specific version of node.js
MIT License
3.83k stars 1.26k forks source link

Changing node-version without changing action makes merging impossible (required job pending) #1107

Open tommyboylab opened 1 month ago

tommyboylab commented 1 month ago

Description: After bumping the node-version used by an action, I find that I'm unable to merge a PR with the changes as the previous action is marked as required but never finished (since it no longer exists)

Action version: v4

Platform:

Runner type:

Tools version: Node-version 16 -> 18, Bun 1.1.18+5a0b93523

Repro steps:

Expected behavior: Bumping node version should not create duplicate jobs, should replace the old jobs.

Actual behavior: Bumping node version duplicates the jobs, marking old ones (which never run as they don't exist) as required so PR is unable to be merged.

priyagupta108 commented 1 month ago

Hello @tommyboylab 👋 , Thank you for your report. We will investigate the issue and get back to you as soon as we have updates.

KathiravanKrish commented 1 month ago

Hi @tommyboylab,

When you bump the Node.js version in a GitHub Action and find that a required status check from a previous action is preventing you from merging, you can resolve this issue by updating the branch protection rules to reflect the new action. Here’s what you can do:

  1. Update Branch Protection Rules:
  1. Merge the PR:

Additionally, please ensure that you do not include node-version: 16 in your workflow file.

For detailed steps on editing branch protection rules, you can refer to GitHub's documentation on configuring protected branches. This should resolve the issue and allow you to merge the PR.