Github CI/CD dual Instance (Prod+stg) Best practice

Hi n8n community.

Quick question.

We have an enterprise version, with 2 instances, 1 prod, 1 staging.

We connected 2 github branches to each environement (main=prod, stg=staging).

I understand the best practice would be to do a PR at Github level as soon as someone request his workflow to be pushed to prod.

How would you only promote a single workflow instead of promoting the full staging environement that has other workflow in developement?

Is there a best practice or recommendation we should follow

Thanks for your guidance!
Michel

1 Like

My thoughts exactly! But so far seems like a single PR to main for every commit on staging is the way to go.

So far I’ve considered:

  • a github action to auto create sequential PR’s for each single commit, and doing big commits for features. This might create merge conflicts eventually and is not very DX friendly
  • a github action for auto cherry picking commits by author or single files, this is similar to the above, better, but have the risk of having more git conflicts
  • accumulating saves on all workflows, and then a single admin commits and pushes changes for every aspect (workflow, credentials, variables, projects), doing a single PR per push at a time. This solves all problem, but focus sync on a single person

The underlying problem still is a single branch per instance, we need different branches! just like in traditional development, so we can create different PR’s.

If N8N had a local mode, were changes made by a user would reflect only on the local environment, and them we could create branches, commit and push changes, things would be so much better.