-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create workflow for calling cointainers-mirror workflows
Signed-off-by: greg pereira <[email protected]>
- Loading branch information
1 parent
96555a1
commit 3915d65
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Trigger Target Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
trigger_chatbot_workflow: | ||
description: 'Boolean: Trigger chatbot workflow in mirror repo?' | ||
type: choice | ||
options: [true, false] | ||
required: true | ||
trigger_model_servers_workflow: | ||
description: 'Boolean: Trigger model_servers workflow in mirror repo?' | ||
type: choice | ||
required: true | ||
options: [true, false] | ||
trigger_mirror_repository: | ||
description: 'Boolean: Trigger mirror_repository workflow in containers repo?' | ||
type: choice | ||
required: true | ||
options: [true, false] | ||
git_ref: | ||
description: 'The desired reference to trigger the pipelines with' | ||
required: true | ||
|
||
jobs: | ||
trigger_mirror_repository: | ||
if: github.event.inputs.trigger_mirror_repository == true | ||
runs-on: ubuntu-latest | ||
env: | ||
TARGET_REPO_OWNER: containers | ||
REPO_NAME: ai-lab-recipes | ||
WORKFLOW_ID: 92734077 | ||
steps: | ||
- name: rigger mirror_repository workflow in the containers owned repo | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${{ env.TARGET_REPO_OWNER }}/${{ env.REPO_NAME }}/actions/workflows/${{ env.WORKFLOW_ID}}/dispatches \ | ||
-d '{"ref":"'${{ github.event.inputs.git_ref }}'"}' | ||
trigger_model_servers_workflow: | ||
if: github.event.inputs.trigger_model_servers_workflow == true | ||
runs-on: ubuntu-latest | ||
env: | ||
TARGET_REPO_OWNER: containers-mirror | ||
REPO_NAME: ai-lab-recipes | ||
WORKFLOW_ID: 92726074 | ||
steps: | ||
- name: Trigger model_servers workflow in the containers-mirror owned repo | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${{ env.TARGET_REPO_OWNER }}/${{ env.REPO_NAME }}/actions/workflows/${{ env.WORKFLOW_ID}}/dispatches \ | ||
-d '{"ref":"'${{ github.event.inputs.git_ref }}'"}' | ||
trigger_chatbot_workflow: | ||
if: github.event.inputs.trigger_chatbot_workflow == true | ||
runs-on: ubuntu-latest | ||
env: | ||
TARGET_REPO_OWNER: containers-mirror | ||
REPO_NAME: ai-lab-recipes | ||
WORKFLOW_ID: 92726072 | ||
steps: | ||
- name: Trigger chatbot workflow in the containers-mirror owned repo | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.PAT }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${{ env.TARGET_REPO_OWNER }}/${{ env.REPO_NAME }}/actions/workflows/${{ env.WORKFLOW_ID}}/dispatches \ | ||
-d '{"ref":"'${{ github.event.inputs.git_ref }}'"}' |