I want to add manually triggered workflow_dispatch
to GitHub actions as follows:
on:
workflow_dispatch:
inputs:
rollbackSteps:
description: "Input rollback steps"
required: false
type: number
default: 1
the problem is there are around 8-10 different repositories which has their own workflows and I want to add this manual trigger to their GitHub actions
I want to avoid duplication by copy pasting same code to each GitHub actions. Is there a way to reuse the workflow. I have the image to create it as central file and then call this file something like that.
If it is not possible to reuse it is there a way to automate this like I define it once and it gets copies to all other repo files?
4