logo
podcast Podcast
get help Get Unstuck

How to try out a new workflow in GitHub Actions

And without cluttering your main branch

Joel Clermont
Joel Clermont
2025-02-06

Recently I was introducing a new workflow to our GitHub Actions setup.

The workflow was meant to be triggered manually through the UI, but as I pushed up my new branch and PR to try it out, the manual workflow wasn't showing up for me to use.

Why? In GitHub, workflows don't show up until they exist in your default branch. So even though it existed in my branch, it wouldn't show up until I merged.

But I didn't want to merge it yet. I wanted to try it out first. Experience tells me it will take a few iterations to get it right, and I don't want to clutter up my default branch with all those commits and failed experiments.

Aaron had a solution for me, which I'll share with you. You can do a very basic stub of the workflow, with just its triggers and name, merge that into your default branch to get it to activate. From there, you can continue to iterate on your branch, and keep re-triggering the workflow to run the latest version in your pending branch.

So you'll end up with two commits in your default branch: the initial stubbed out version, and the final perfected version.

Here to help,

Joel

P.S. Would you like two seasoned Laravel experts to review your application code and architecture? Let's set up a time to talk.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice you can use.