Surely you just need the workflow to not have embedded logic but call out to a task manager so you can do the same locally?
You can take this a setup furthur and use an environment manager to removing the installing of tools from CI as well for local/remote consistency and more benefits.