From 38dbd45512b81ce2a87023f59d8399a1789bd596 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sat, 24 Aug 2024 16:33:01 -0400 Subject: [PATCH] feat: Add "control-instance-from-workflow" to enable reuse --- .../control-instance-from-workflow.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/control-instance-from-workflow.yml diff --git a/.github/workflows/control-instance-from-workflow.yml b/.github/workflows/control-instance-from-workflow.yml new file mode 100644 index 00000000..4a501278 --- /dev/null +++ b/.github/workflows/control-instance-from-workflow.yml @@ -0,0 +1,40 @@ +name: Control Instance from Workflow + +on: + workflow_dispatch: + inputs: + issue_number: + description: "Issue number" + required: true + type: number + command_name: + description: + "Name of the command to execute: create, delete, shelve, unshelve" + required: true + type: string + workflow_call: + inputs: + issue_number: + description: "Issue number" + required: true + type: number + command_name: + description: + "Name of the command to execute: create, delete, shelve, unshelve" + required: true + type: string +permissions: + issues: write + checks: read + +jobs: + control: + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + + - name: Control instance + uses: ./.github/actions/control-instance + with: + issue_number: ${{ inputs.issue_number }} + command_name: ${{ inputs.command_name }}